• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[Trigger] Dialogs issue, can anyone solve it?

Status
Not open for further replies.
Well for some reason after the first dialog, the buttons no longer work. Any help is welcome.

[trigger=]
DMFig
Events
Conditions
Actions
Hashtable - Create a hashtable
Set DM_Table = (Last created hashtable)
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked player) controller) Equal to (==) User
((Picked player) slot status) Equal to (==) Is playing
Then - Actions
Dialog - Clear Adialog
Dialog - Change the title of Adialog to conquest or pact
Dialog - Create a dialog button for Adialog labelled conquest
Set Adialog_buttons[1] = (Last created dialog Button)
Dialog - Create a dialog button for Adialog labelled pact
Set Adialog_buttons[2] = (Last created dialog Button)
Dialog - Show Adialog for (Picked player)
Player Group - Add (Picked player) to ActivePlayers
Player Group - Add (Picked player) to afkers
Else - Actions
[/trigger]
[trigger=]
DMClick
Events
Dialog - A dialog button is clicked for Adialog
Conditions
Actions
Player Group - Add (Triggering player) to AlreadyVoted
Player Group - Remove (Triggering player) from afkers
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to (==) Adialog_buttons[1]
Then - Actions
Set Conquest = (Conquest + 1)
Else - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to (==) Adialog_buttons[2]
Then - Actions
Set PactOfBlood = (PactOfBlood + 1)
Else - Actions
Player Group - Pick every player in afkers and do (Actions)
Loop - Actions
Dialog - Hide Adialog for (Picked player)
Dialog - Clear Adialog
Dialog - Change the title of Adialog to test
Dialog - Create a dialog button for Adialog labelled Yeah
Set Adialog_buttons[1] = (Last created dialog Button)
Dialog - Create a dialog button for Adialog labelled Nah
Set Adialog_buttons[2] = (Last created dialog Button)
Dialog - Show Adialog for (Picked player)
Trigger - Run mode check <gen> (ignoring conditions)
[/trigger]
[trigger=]
mode check
Events
Conditions
Actions
Game - Display to (All players) the text: (String((Number of players in ActivePlayers)))
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Conquest + PactOfBlood) Greater than or equal to (>=) (Number of players in ActivePlayers)
Then - Actions
Set temp_trigger = afk check <gen>
Custom script: call DestroyTrigger(udg_temp_trigger)
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Conquest Greater than (>) PactOfBlood
Then - Actions
Game - Display to (All players) the text: (conquest has been chosen as game mode! - + ((String(Conquest)) + ( vs + (String(PactOfBlood)))))
Set conquest_mode = True
Else - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Conquest Less than (<) PactOfBlood
Then - Actions
Game - Display to (All players) the text: (pact of blood has been chosen as game mode! - + ((String(PactOfBlood)) + ( vs + (String(Conquest)))))
Trigger - Run blood pact <gen> (checking conditions)
Set pact_of_blood_mode = True
Trigger - Run blood pact <gen> (checking conditions)
Else - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Conquest Equal to (==) PactOfBlood
Then - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 2) Equal to (==) 1
Then - Actions
Game - Display to (All players) the text: (conquest has been chosen as game mode by the RNG gods! - + ((String(Conquest)) + ( vs + (String(PactOfBlood)))))
Set conquest_mode = True
Else - Actions
Game - Display to (All players) the text: (pact of blood has been chosen as game mode by the RNG gods! - + ((String(PactOfBlood)) + ( vs + (String(Conquest)))))
Trigger - Run blood pact <gen> (checking conditions)
Set pact_of_blood_mode = True
Else - Actions
Else - Actions
Multiboard - Set the text for multiboard item in column 1, row 2 to (String(Conquest))
Multiboard - Set the text for multiboard item in column 2, row 2 to (String(PactOfBlood))
Game - Display to (All players) the text: ddddddddddddddddddd...
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of players in afkers) Less than or equal to (<=) 0
conquest_mode Equal to (==) True
Then - Actions
Game - Display to (All players) the text: s
Multiboard - Destroy multiboard
Trigger - Run init Copy <gen> (checking conditions)
Trigger - Turn off (This trigger)
Else - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of players in afkers) Less than or equal to (<=) 0
pact_of_blood_mode Equal to (==) True
Then - Actions
Multiboard - Destroy multiboard
Trigger - Run to war PACT <gen> (checking conditions)
Trigger - Turn off (This trigger)
Else - Actions
[/trigger]
Now all that worked, how come this below fails horribly....?
[trigger=]
init Copy
Events
Conditions
Actions
Game - Display to (All players) the text: s
Wait 0.20 game-time seconds
Countdown Timer - Start afk_timer as a One-shot timer that will expire in 60.00 seconds
Trigger - Turn off DMClick <gen>
Trigger - Turn on dialog click2 <gen>
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Dialog - Hide Adialog for (Picked player)
Dialog - Clear Adialog
Dialog - Change the title of Adialog to mercy
Dialog - Create a dialog button for Adialog labelled Yeah
Set Adialog_buttons[3] = (Last created dialog Button)
Dialog - Create a dialog button for Adialog labelled Nah
Set Adialog_buttons[4] = (Last created dialog Button)
Dialog - Show Adialog for (Picked player)
Player Group - Add (Picked player) to afkers
[/trigger]
[trigger=]
dialog click2
Events
Dialog - A dialog button is clicked for Adialog
Conditions
Actions
Player Group - Add (Triggering player) to AlreadyVoted
Player Group - Remove (Triggering player) from afkers
Do Multiple ActionsFor each (Integer DDloop) from 1 to DDmax, do (Actions)
Loop - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to (==) Adialog_buttons[3]
Then - Actions
Set yes = (yes + 1)
Game - Display to (All players) the text: yes
Game - Display to (All players) the text: (String(yes))
Else - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to (==) Adialog_buttons[4]
Then - Actions
Set no = (no + 1)
Game - Display to (All players) the text: no
Game - Display to (All players) the text: (String(no))
Else - Actions
Player Group - Pick every player in afkers and do (Actions)
Loop - Actions
Dialog - Hide Adialog for (Picked player)
Dialog - Clear Adialog
Dialog - Change the title of Adialog to test
Dialog - Create a dialog button for Adialog labelled Yeah
Set Adialog_buttons[1] = (Last created dialog Button)
Dialog - Create a dialog button for Adialog labelled Nah
Set Adialog_buttons[2] = (Last created dialog Button)
Dialog - Show Adialog for (Picked player)
Trigger - Run mode check2 <gen> (ignoring conditions)
[/trigger]
[trigger=]
mode check2
Events
Conditions
Actions
Game - Display to (All players) the text: (String((Number of players in ActivePlayers)))
Game - Display to (All players) the text: (String(yes))
Game - Display to (All players) the text: (String(no))
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(no + yes) Greater than or equal to (>=) (Number of players in ActivePlayers)
Then - Actions
Game - Display to (All players) the text: ddddddddddddddddddd...
Trigger - Run to war dialog <gen> (checking conditions)
Set temp_trigger = afk check2 <gen>
Custom script: call DestroyTrigger(udg_temp_trigger)
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
yes Greater than (>) no
Then - Actions
Game - Display to (All players) the text: (The sub-mode "Mercy" has been allowed! - + ((String(yes)) + ( vs + (String(no)))))
Set mercy = True
Else - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
yes Less than (<) no
Then - Actions
Game - Display to (All players) the text: (The sub-mode "Mercy" has been disabled! - + ((String(no)) + ( vs + (String(yes)))))
Set mercy = False
Else - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
yes Equal to (==) no
Then - Actions
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 2) Equal to (==) 1
Then - Actions
Game - Display to (All players) the text: (The sub-mode "Mercy" has been allowed by the RNG gods! - + ((String(yes)) + ( vs + (String(no)))))
Set mercy = True
Else - Actions
Game - Display to (All players) the text: (The sub-mode "Mercy" has been disabled by the RNG gods! - + ((String(yes)) + ( vs + (String(no)))))
Set mercy = False
Else - Actions
Trigger - Turn off (This trigger)
Else - Actions
[/trigger]
There's more, but I don't see any reason to keep posting it since this is where it stops working and fails to register anything. Oh, also it doesn't run the next trigger as well.


Is it possible that dialogs don't work in single player?
 
Status
Not open for further replies.
Top