- Joined
- Apr 1, 2009
- Messages
- 201
I'm trying to make a trigger when you enter a region, a dialog menu pops up and when you click one of the buttons it moves your unit somewhere. I made the trigger where the unit enters the region and it displays the dialog, but I'm not sure how to figure out to move the unit with the dialog button that was clicked. Here's the first trigger, I'll also display the second trigger but it doesn't work at all. Whats wrong with the second trigger is that it doesn't know where to get the triggering unit from because a dialog button was clicked, but I'm not sure how to fix it so it can.
-
Elevator
-
Events
- Unit - A unit enters Elevator Enter <gen>
- Unit - A unit enters Floor 1 Exit Spot <gen>
- Unit - A unit enters Floor 2 Exit Spot <gen>
- Unit - A unit enters Floor 3 Exit Spot <gen>
-
Conditions
- (Owner of (Entering unit)) Not equal to Player 12 (Brown)
-
Actions
- Dialog - Clear Elevator
- Dialog - Change the title of Elevator to Elevator
- Dialog - Create a dialog button for Elevator labelled First Floor
- Set ElevatorButton[1] = (Last created dialog Button)
- Dialog - Create a dialog button for Elevator labelled Second Floor
- Set ElevatorButton[2] = (Last created dialog Button)
- Dialog - Create a dialog button for Elevator labelled Third Floor
- Set ElevatorButton[3] = (Last created dialog Button)
- Dialog - Create a dialog button for Elevator labelled Lobby
- Set ElevatorButton[4] = (Last created dialog Button)
- Dialog - Show Elevator for (Owner of (Entering unit))
-
Events
-
Elevator Button
-
Events
- Dialog - A dialog button is clicked for Elevator
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Clicked dialog button) Equal to ElevatorButton[1]
-
Then - Actions
- Camera - Pan camera for (Owner of (Triggering unit)) to (Center of Floor 1 Enter Spot <gen>) over 0.00 seconds
- Unit - Move (Triggering unit) instantly to (Center of Floor 1 Enter Spot <gen>)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Clicked dialog button) Equal to ElevatorButton[2]
-
Then - Actions
- Camera - Pan camera for (Owner of (Triggering unit)) to (Center of Floor 2 Enter Spot <gen>) over 0.00 seconds
- Unit - Move (Triggering unit) instantly to (Center of Floor 2 Enter Spot <gen>)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Clicked dialog button) Equal to ElevatorButton[3]
-
Then - Actions
- Camera - Pan camera for (Owner of (Triggering unit)) to (Center of Floor 3 Enter Spot <gen>) over 0.00 seconds
- Unit - Move (Triggering unit) instantly to (Center of Floor 3 Enter Spot <gen>)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Clicked dialog button) Equal to ElevatorButton[4]
-
Then - Actions
- Camera - Pan camera for (Owner of (Triggering unit)) to (Center of Elevator Exit <gen>) over 0.00 seconds
- Unit - Move (Triggering unit) instantly to (Center of Elevator Exit <gen>)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events