Diag event button not working.

vaziocs

New Member
Reaction score
5
Need some help here, at first when i runned the event with the condition refering to an invalid condition(without setting the dialog button variable) it was working, but now that the condition is valid and it doesnt work:banghead:
when it should.
the first trigger is this
event - Unit - A unit enters kidenter2 <gen>

If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
enteredkid[(Player number of (Owner of (Triggering unit)))] Equal to False
Then - Actions
Dialog - Create a dialog button for diagkid labelled yes
Set yes = (Last created dialog Button)
Dialog - Create a dialog button for diagkid labelled no
Set no = (Last created dialog Button)
Dialog - Change the title of diagkid to (Are you sure + (Name of (Triggering player)))
Dialog - Show diagkid for (Owner of (Triggering unit))
Wait 4.00 seconds
Dialog - Clear diagkid
Dialog - Hide diagkid for (Owner of (Triggering unit))
Trigger - Run but1yes <gen> (checking conditions)
Else - Actions
Do nothing

the other one is this(but1yes)-trigger:
event
Dialog - A dialog button is clicked for diagkid
condition
(Clicked dialog button) Equal to yes
action
Dialog - Clear diagkid
Dialog - Hide diagkid for (Owner of (Triggering unit))
Game - Display to (All players) the text: YES CLICKED.
Unit Group - Pick every unit in (Units owned by (Owner of (Triggering unit)) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
Loop - Actions
Trigger - Turn on KidFound <gen>
Unit - Move (Picked unit) instantly to (Center of kideventregion <gen>)
Countdown Timer - Start kidtimer as a One-shot timer that will expire in 80.00 seconds
Countdown Timer - Create a timer window for (Last started timer) with title Kid event:
Countdown Timer - Change the color of the title for (Last created timer window) to (100.00%, 80.00%, 20.00%) with 0.00% transparency
Set enteredkid[(Player number of (Owner of (Triggering unit)))] = True

**
it displays the yes clicked message just doesnt do the rest.
if i go twice leave the region, then enter again, without setting the variable like i said it works..dunno whats the problem .
 

Synoscope

New Member
Reaction score
1
The variable is setting every time the trigger is ran.

In a separate trigger set the variables 'yes' and 'no' and have that trigger run at map start up.
This way they will only be set once and when your trigger typically runs (if you remove the settings from the trigger you have up there) they won't be set again- only ran.

Also don't do this until either no one replies for a while or someone tells me if I'm wrong here... I played with dialog buttons ages ago.


Or at least make a back up copy of your triggers (copy-pasta)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top