Dalemil
New Member
- Reaction score
- 2
I'm trying to make it whenever a player clicks a dialog button, a trigger will run that spawns units based on what they chose. For example, if a player chooses Night Elves, the player's spawning unit will spawn Treants so on and so forth.
Trigger:
- Button Setup
- Events
- Time - Elapsed game time is 10.00 seconds
- Conditions
- Actions
- Player Group - Pick every player in (All players) and do (Actions)
- Loop - Actions
- If (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 Dialog
- Dialog - Change the title of Dialog to |c00889e78Choose Yo...
- Dialog - Create a dialog button for Dialog labelled Human
- Set Button[1] = (Last created dialog Button)
- Dialog - Create a dialog button for Dialog labelled Orc
- Set Button[2] = (Last created dialog Button)
- Dialog - Create a dialog button for Dialog labelled Night Elf
- Set Button[3] = (Last created dialog Button)
- Dialog - Create a dialog button for Dialog labelled Undead
- Set Button[4] = (Last created dialog Button)
- Dialog - Show Dialog for (Picked player)
- Else - Actions
- Do nothing
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- Player Group - Pick every player in (All players) and do (Actions)
- Events
Trigger:
- Picked Nation
- Events
- Dialog - A dialog button is clicked for Dialog
- Conditions
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Clicked dialog button) Equal to Button[1]
- Then - Actions
- Unit - Create 1 Human Spawner for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
- Camera - Pan camera for (Owner of (Last created unit)) to (Position of (Last created unit)) over 0.00 seconds
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Clicked dialog button) Equal to Button[2]
- Then - Actions
- Unit - Create 1 Orc Spawner for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
- Camera - Pan camera for (Owner of (Last created unit)) to (Position of (Last created unit)) over 0.00 seconds
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Clicked dialog button) Equal to Button[3]
- Then - Actions
- Unit - Create 1 Night Elf Spawner for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
- Camera - Pan camera for (Owner of (Last created unit)) to (Position of (Last created unit)) over 0.00 seconds
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Clicked dialog button) Equal to Button[4]
- Then - Actions
- Unit - Create 1 Undead Spawner for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees
- Camera - Pan camera for (Owner of (Last created unit)) to (Position of (Last created unit)) over 0.00 seconds
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events