HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Dialog Disaster

04-10-2004, 09:39 PM#1
HEZZA
for my map i made a dialog system where u could ally with other players rather than using using unlocked teams.

Initally soon as a player type -ally they get a menu of all players they can ally with - this is in the first trigger

then i created a trigger for each dialog button...BUT trouble is i created a new trigger so i cant get who typed the message....i tried using gamecache but i never used it before so im not to familar with that...

i dont care if its not game cache or what, just pls help!
04-10-2004, 10:03 PM#2
-={tWiStÄr}=-
I would have to see ur trigger that creates the dialog.
04-11-2004, 12:42 AM#3
HEZZA
removed game cache actions cause it was bugging map
========================================================
Events
Player - Player 1 (Red) types a chat message containing -Ally as An exact match
Player - Player 2 (Blue) types a chat message containing -Ally as An exact match
Player - Player 3 (Teal) types a chat message containing -Ally as An exact match
Player - Player 4 (Purple) types a chat message containing -Ally as An exact match
Player - Player 5 (Yellow) types a chat message containing -Ally as An exact match
Player - Player 6 (Orange) types a chat message containing -Ally as An exact match
Player - Player 7 (Green) types a chat message containing -Ally as An exact match
Player - Player 8 (Pink) types a chat message containing -Ally as An exact match
Conditions
Actions
Dialog - Change the title of Allies to |cffff0000FPropose ...
Dialog - Create a dialog button for Allies labelled (|c0000cdf9Ally with + (Name of Player 1 (Red)))
Set player1 = (Last created dialog Button)
Dialog - Create a dialog button for Allies labelled (|c0000cdf9Ally with + (Name of Player 2 (Blue)))
Set player1_Copy = (Last created dialog Button)
Dialog - Create a dialog button for Allies labelled (|c0000cdf9Ally with + (Name of Player 3 (Teal)))
Set player1_Copy_2 = (Last created dialog Button)
Dialog - Create a dialog button for Allies labelled (|c0000cdf9Ally with + (Name of Player 4 (Purple)))
Set player1_Copy_3 = (Last created dialog Button)
Dialog - Create a dialog button for Allies labelled (|c0000cdf9Ally with + (Name of Player 5 (Yellow)))
Set player1_Copy_4 = (Last created dialog Button)
Dialog - Create a dialog button for Allies labelled (|c0000cdf9Ally with + (Name of Player 6 (Orange)))
Set player1_Copy_5 = (Last created dialog Button)
Dialog - Create a dialog button for Allies labelled (|c0000cdf9Ally with + (Name of Player 7 (Green)))
Set player1_Copy_6 = (Last created dialog Button)
Dialog - Create a dialog button for Allies labelled (|c0000cdf9Ally with + (Name of Player 8 (Pink)))
Set pla
04-11-2004, 01:26 AM#4
-={tWiStÄr}=-
put this in
Code:
If ((Clicked dialog button) Equal to player1) then do (Player - Make (Triggering player) treat Player 1 (Red) as an Ally with shared vision) else do (Do nothing)
If ((Clicked dialog button) Equal to player1_Copy then do (Player - Make (Triggering player) treat Player 2 (Blue) as an Ally with shared vision) else do (Do nothing)
If ((Clicked dialog button) Equal to player1_Copy2) then do (Player - Make (Triggering player) treat Player 3 (Teal) as an Ally with shared vision) else do (Do nothing)
etc...
note: make ur var names better so u dont get confused player1 player2...
also, you may want to make something to make it so your not allying with yourself :p
04-11-2004, 01:38 AM#5
HEZZA
ah i failed to mention once you clicked on one of the buttons , your ally then gets a dialoug asking if he accepts or not :\
04-11-2004, 02:08 AM#6
-={tWiStÄr}=-
ok.. urg this would be easier if i were talking to u like on irc or something but thats fine. instead of
If ((Clicked dialog button) Equal to player1) then do (Player - Make (Triggering player) treat Player 1 (Red) as an Ally with shared vision) else do (Do nothing)
put
If ((Clicked dialog button) Equal to (player1)) then do (Trigger - Run (Player2ally) (ignoring conditions)) else do (Do nothing)

and in player2ally you would bring a dialog with 2 buttons, accept, decline. if they click accept set allytrue=true if they click decline set allytrue=false. then right after that check if allytrue is true and if it is make them each treat eachother as allies. then set allytrue back to false just in case you need it for something else. you know what else you should do, at the end of the first trigger set some var like allydialogon=true and make sure its false in the condition so its only 1 at a time. then after the 2nd player clicks accept or decline, set it back to false.
04-11-2004, 06:31 PM#7
HEZZA
Forgive me but i have the flu and it has realy screwed my concentration...have u got ICQ....msn

dont use mIRC it screwed me comp :<
04-11-2004, 07:38 PM#8
-={tWiStÄr}=-
ive got msn [email protected] but i cant get on it now because i dont have my comp.

edit: just got my comp back