Dialog issue, + rep

Glaivesrit

New Member
Reaction score
8
What i want my trigger to do is when you enter a region, box pops up, hit yes or no, if yes, move to certain region, if no, do nothing. My triggers are:


Code:
Stormherald Armory Enter
    Events
        Unit - A unit enters Stormherald Armory Enter <gen>
    Conditions
        (Unit-type of (Triggering unit)) Equal to Ikka
    Actions
        Dialog - Clear StormheraldArmory
        Dialog - Change the title of StormheraldArmory to Do you wish to ente...
        Dialog - Create a dialog button for StormheraldArmory labelled Yes
        Set Yes = (Last created dialog Button)
        Dialog - Create a dialog button for StormheraldArmory labelled No
        Set No = (Last created dialog Button)
        Dialog - Show StormheraldArmory for (Owner of (Triggering unit))
        Trigger - Turn off (This trigger)
Second Trigger is

Code:
SAED
    Events
        Dialog - A dialog button is clicked for StormheraldArmory
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Clicked dialog button) Equal to Yes
            Then - Actions
                Environment - Set sky to None
                Unit Group - Pick every unit in (Units in Stormherald Armory Enter <gen>) and do (Unit - Move (Picked unit) instantly to (Center of Stormherald Armory Leave <gen>), facing 90.00 degrees)
                Trigger - Turn on Stormherald Armory Leave <gen>
                Trigger - Turn off (This trigger)
            Else - Actions
What happens is the button pops up, asks me yes, or no. I hit yes, nothing happens, i hit no, nothing happens.

I have 3 variables, Yes, No, and StormheraldArmory. Yes and no are dialog buttons, StormheraldArmory is dialog. The buttons have no array.

thanks for any help, +rep if you can help make it work!

_now in code tags
 

Romek

Super Moderator
Reaction score
963
Use code tags. Your code is unreadable at the moment.
 

iPeez

Hot food far all world wide!
Reaction score
165
"I" cant find any issues, but I am no master. Are you sure all the variables are the right kind, regions exsist etc,...?
 

Glaivesrit

New Member
Reaction score
8
i can honestly say that everything is in line (to my capabilities). no idea why this won't work. the buttons have no initial value, the dialog itself is (New Dialog Default)

It wouldn't help if i restarted WE would it?
 

Pharaoh_

The epic journey will soon begin... Prepare!
Reaction score
136
Why do you call: "Dialog - Clear StormheraldArmory"? Because you re-call it in trigger 2. Maybe it is counted as if there is not such a dialog?
 

Glaivesrit

New Member
Reaction score
8
i have enterable buildings on my map so i titled the name of the dialog StormHeraldArmory. Pretty much the whole dialog is asking if they want to enter the building. I named the variable StormHeraldArmory to keep things clear.
 

Pharaoh_

The epic journey will soon begin... Prepare!
Reaction score
136
Damn, i don't mean that. Go to Actions a bit: If you go to "Dialog - Clear", it is written with grey letters: "This clears the title and buttons for the specified dialog." Since you make such an action in the beginning of your trigger, it will of course not work, since you destroy the buttons. So, normally trigger2 won't work because of destroying the dialog buttons (and so their functionality and the variables that refer to those buttons).
 

Glaivesrit

New Member
Reaction score
8
ok, maybe i'm not getting it, but i put dialog-clear at the start of the trigger, so it won't interfere with the trigger that is already up, and i set the buttons after it is cleared.

i used http://world-editor-tutorials.thehelper.net/dialogs.php

i understood if you put it at the start it cleared up any pre-sets. but if you set everything after the clear, then nothing that you need for the trigger is cleared, right?
 

Pharaoh_

The epic journey will soon begin... Prepare!
Reaction score
136
Then, if you want it to work this way, you might need to set a variable with that dialog button right after the Clear action. Or after the Clear action, create a new Dialog instead. Dialogs don't leak, so don't worry, create a new Dialog!
 

CysticCraze

New Member
Reaction score
12
Just a lil fyi, i did it to, thought this would be kewl in my map... but I got the same result, it might be easier to work off mine so because its all one trigger. Hopes this helps both of us Glaive, and im assuming your enterable buildings were idealized from my RPG :) if not kewl beans to both of us. Heres the trigger.

Code:
NE Tower Trigger Dialog
    Events
        Unit - A unit enters Night Elf Tower <gen>
    Conditions
        ((Triggering unit) is A Hero) Equal to True
    Actions
        Dialog - Clear NeTower
        Dialog - Change the title of NeTower to Do you wish to ente...
        Dialog - Create a dialog button for NeTower labelled Yes
        Set NeTowerYes = (Last created dialog Button)
        Dialog - Create a dialog button for NeTower labelled No
        Set NeTowerNo = (Last created dialog Button)
        Dialog - Show NeTower for Player 1 (Red)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Clicked dialog button) Equal to NeTowerYes
            Then - Actions
                Set TowerCam = True
                Set NormCam = False
                Unit - Move Arthas 0002 <gen> instantly to (Center of Night Elf Tower Inside <gen>)
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Clicked dialog button) Equal to NeTowerNo
                    Then - Actions
                        Dialog - Clear NeTower
                    Else - Actions
 

CysticCraze

New Member
Reaction score
12
It looks great, howver when i posted my template map, i had chanted the terrain a lil, so if you got it the coords for the height offset for the building is -40 instead of 20 >,<. But i like how it asks you because in the past, I had problems with running through the region and out the otherside of the one i had. This seems like a great idea :) props to you.
 

Glaivesrit

New Member
Reaction score
8
+ rep for the trigger cystic. works. im gonna upload a vid tomorrow of my town that requires this much crap. (or the next day) so ill just send it to you directly. id like to see your map though, like even screens, of it how it is atm. were kind of working on a similar project, cept i'm upgrading everything from a basic viewpoint to the more advanced (enterable buildings, etc, from a previous map) and i believe youre starting off on a new template?
 

CysticCraze

New Member
Reaction score
12
ROFL it works???? doesnt work on mine glad it works =PPPP

LOL post yours. Id like to see.

As for the map, its now under members projects as CysticsRTS (Not Yet Named)... its should have been RPG... my bad.
 

Glaivesrit

New Member
Reaction score
8
my original trigger works, i screwed up on the variable type. I noticed your variable though and i was like oh my bad
 

CysticCraze

New Member
Reaction score
12
I did i used ur trigger and that site, worked off em but i opened a new thread and someone helped me, me and u need to make a map sometime :). Wish they had a LAN/onlineconnection where we could use the same editor together =P
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top