HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Another Yes/No Dialog question

12-21-2005, 04:39 AM#1
Ezula
I'm also working on a yes/no box just like this, and I can't make it I don'T know what's the problem. I have declared 1 variable dialog and 2 variables dialog button. Here's the triggers I have made so far for this dialog :

------------------------1st trigger--------------
Event
Unit enters rect

Action
game text asking a question which would be answered by yes or no
"dialog variable" = new dialog
changing title of "dialog variable"
creating button for "dialog variable" (text = YES)
set button1 variable = last created button
creating button for "dialog variable" (text = NO)
set button2 variable = last created button
show "dialog variable" for owner of entering unit
------------------------------------------------

------------------------2nd trigger---------------

Event
A dialog button is clicked for "dialog variable"

Action
IF clicked dialog button = button1
THEN do (some actions)
ELSE IF clicked dialog button = button2
THEN do (some other actions)
ELSE (give 100 gold to all players) **to see if the trigger is at least running**

------------------------------------------------

And BAM, nothing happens :P I mean, the dialog box pop out and it looks fine, but when i click a button, no actions occurs, even not that 100 gold check up, which makes me feel like the game is not recognizing my button click.... To the game, it's like if the button was not clicked or not properly...

I also tried to put a "run 2nd trigger" at the end of the 1st trigger (without checking conditions, there are none) in this way i was receiving the 100 gold pieces, which means that the comparison either never occured or was false for both buttons, kinda impossible since i actually clicked one of those buttons...

Anyway if anyone can see why the game aint seeing my button click, please help me, and thanks !
12-21-2005, 10:40 AM#2
iNfraNe
Ok first of all, dont ask in draenai-seer's thread, it's his personal question, and not a place for you to ask yours. Create your own thread.
Next, please copy your triggers using ctrl+shift+c to copy them as text, also use the [code] (or [trigger] when thats done) bbcode to make it more readable.

To your problem: the trigger doesnt run because in the first trigger you create a NEW dialog. This dialog then doesnt have any events and you will have to redo those events. So.. solution: dont create a new dialog or use the trigger - add new event action.
12-21-2005, 11:15 AM#3
Starcraftfreak
I split the thread.
12-21-2005, 02:18 PM#4
Ezula
First of all, sorry for posting on another's thread I will make new thread when I'll have to.

Second, many thanks to iNfraNe, you fixed my problem well, that new dialog wasn't the good thing to pu on, I just removed it and it worked...

Also I didn't know about the ctrl+shift+c so later I'll post triggers correctly.

Thanks !