This is probably an easy fix but I am stuck and feeling stupid. I used a template for this from here to make my hero select menu: https://world-editor-tutorials.thehelper.net/dialogs.php
And while it does work, I have a problem that the Worg options show up for the Poachers when they should be getting Poacher options instead. When you click the button, you get two heroes as well, so like instead of getting one Worg, you get two Worgs. Also please excuse how much I butchered the tutorial template for this, with triggers I am basically just referencing, copying how-to-guides and playing by ear since they're still so new to me. I was hoping someone could perhaps remake how these two hero select modes should look, since it'd help me learn.
Thank you in advance!
POACHERS
Melee Initialization Copy
Events
Map initialization
Conditions
Actions
-------- Preparing Hero List --------
Set VariableSet Heroes[1] = Bandit
Set VariableSet Heroes[2] = Smuggler
-
ShowDialog Copy
Events
Time - Elapsed game time is 28.00 seconds
Conditions
Actions
Player Group - Add Player 3 (Teal) to PoacherPlayer
Player Group - Add Player 4 (Purple) to PoacherPlayer
Player Group - Add Player 8 (Pink) to PoacherPlayer
Player Group - Pick every player in PoacherPlayer and do (Actions)
Loop - Actions
-------- Setup for Dialog 1 --------
Dialog - Clear HeroDialog1
Dialog - Change the title of HeroDialog1 to Choose your Poacher
Dialog - Create a dialog button for HeroDialog1 labelled Bandit
Set VariableSet DialogButtons[1] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog1 labelled Smuggler
Set VariableSet DialogButtons[2] = (Last created dialog Button)
Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
Loop - Actions
Dialog - Show HeroDialog1 for (Picked player)
-
DoDialog Copy
Events
Dialog - A dialog button is clicked for HeroDialog1
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to DialogButtons[5]
Then - Actions
Else - Actions
-------- Switch to page 1 --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to DialogButtons[10]
Then - Actions
Dialog - Change the title of HeroDialog1 to Choose a Hero (1/2)
Dialog - Show HeroDialog1 for (Triggering player)
Skip remaining actions
Else - Actions
-------- Create the chosen Hero --------
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to DialogButtons[(Integer A)]
Then - Actions
Unit - Create 1 Heroes[(Integer A)] for (Triggering player) at (Center of wolf spawn <gen>) facing Default building facing degrees
Hero - Set Name of (Last created unit) to (Name of (Owner of (Last created unit)))
Selection - Select (Last created unit) for (Triggering player)
Game - Display to (Player group((Triggering player))) the text: (Name of (Last created unit))
Game - Display to PoacherPlayer the text: You are a Poacher a...
Else - Actions
WORG CUBS
Melee Initialization
Events
Map initialization
Conditions
Actions
-------- Preparing Hero List --------
Set VariableSet Heroes[1] = Brutewolf
Set VariableSet Heroes[2] = Magewolf
Set VariableSet Heroes[3] = Shieldwolf
-
ShowDialog
Events
Time - Elapsed game time is 28.00 seconds
Conditions
Actions
Player Group - Add Player 1 (Red) to WolflingPlayer
Player Group - Add Player 2 (Blue) to WolflingPlayer
Player Group - Add Player 5 (Yellow) to WolflingPlayer
Player Group - Add Player 6 (Orange) to WolflingPlayer
Player Group - Add Player 7 (Green) to WolflingPlayer
Player Group - Add Player 9 (Gray) to WolflingPlayer
Player Group - Pick every player in WolflingPlayer and do (Actions)
Loop - Actions
-------- Setup for Dialog 1 --------
Dialog - Clear HeroDialog1
Dialog - Change the title of HeroDialog1 to Choose your Worg
Dialog - Create a dialog button for HeroDialog1 labelled Brutewolf
Set VariableSet DialogButtons[1] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog1 labelled Magewolf
Set VariableSet DialogButtons[2] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog1 labelled Shieldwolf
Set VariableSet DialogButtons[3] = (Last created dialog Button)
Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
Loop - Actions
Dialog - Show HeroDialog1 for (Picked player)
-
DoDialog
Events
Dialog - A dialog button is clicked for HeroDialog1
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to DialogButtons[5]
Then - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to DialogButtons[10]
Then - Actions
Dialog - Change the title of HeroDialog1 to Choose a Hero (1/2)
Dialog - Show HeroDialog1 for (Triggering player)
Skip remaining actions
Else - Actions
-------- Create the chosen Hero --------
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to DialogButtons[(Integer A)]
Then - Actions
Unit - Create 1 Heroes[(Integer A)] for (Triggering player) at (Center of wolf spawn <gen>) facing Default building facing degrees
Hero - Set Name of (Last created unit) to (Name of (Owner of (Last created unit)))
Selection - Select (Last created unit) for (Triggering player)
Game - Display to (Player group((Triggering player))) the text: (Name of (Last created unit))
Game - Display to WolflingPlayer the text: You are a Worg cub ...
Else - Actions
And while it does work, I have a problem that the Worg options show up for the Poachers when they should be getting Poacher options instead. When you click the button, you get two heroes as well, so like instead of getting one Worg, you get two Worgs. Also please excuse how much I butchered the tutorial template for this, with triggers I am basically just referencing, copying how-to-guides and playing by ear since they're still so new to me. I was hoping someone could perhaps remake how these two hero select modes should look, since it'd help me learn.
Thank you in advance!
POACHERS
Melee Initialization Copy
Events
Map initialization
Conditions
Actions
-------- Preparing Hero List --------
Set VariableSet Heroes[1] = Bandit
Set VariableSet Heroes[2] = Smuggler
-
ShowDialog Copy
Events
Time - Elapsed game time is 28.00 seconds
Conditions
Actions
Player Group - Add Player 3 (Teal) to PoacherPlayer
Player Group - Add Player 4 (Purple) to PoacherPlayer
Player Group - Add Player 8 (Pink) to PoacherPlayer
Player Group - Pick every player in PoacherPlayer and do (Actions)
Loop - Actions
-------- Setup for Dialog 1 --------
Dialog - Clear HeroDialog1
Dialog - Change the title of HeroDialog1 to Choose your Poacher
Dialog - Create a dialog button for HeroDialog1 labelled Bandit
Set VariableSet DialogButtons[1] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog1 labelled Smuggler
Set VariableSet DialogButtons[2] = (Last created dialog Button)
Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
Loop - Actions
Dialog - Show HeroDialog1 for (Picked player)
-
DoDialog Copy
Events
Dialog - A dialog button is clicked for HeroDialog1
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to DialogButtons[5]
Then - Actions
Else - Actions
-------- Switch to page 1 --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to DialogButtons[10]
Then - Actions
Dialog - Change the title of HeroDialog1 to Choose a Hero (1/2)
Dialog - Show HeroDialog1 for (Triggering player)
Skip remaining actions
Else - Actions
-------- Create the chosen Hero --------
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to DialogButtons[(Integer A)]
Then - Actions
Unit - Create 1 Heroes[(Integer A)] for (Triggering player) at (Center of wolf spawn <gen>) facing Default building facing degrees
Hero - Set Name of (Last created unit) to (Name of (Owner of (Last created unit)))
Selection - Select (Last created unit) for (Triggering player)
Game - Display to (Player group((Triggering player))) the text: (Name of (Last created unit))
Game - Display to PoacherPlayer the text: You are a Poacher a...
Else - Actions
WORG CUBS
Melee Initialization
Events
Map initialization
Conditions
Actions
-------- Preparing Hero List --------
Set VariableSet Heroes[1] = Brutewolf
Set VariableSet Heroes[2] = Magewolf
Set VariableSet Heroes[3] = Shieldwolf
-
ShowDialog
Events
Time - Elapsed game time is 28.00 seconds
Conditions
Actions
Player Group - Add Player 1 (Red) to WolflingPlayer
Player Group - Add Player 2 (Blue) to WolflingPlayer
Player Group - Add Player 5 (Yellow) to WolflingPlayer
Player Group - Add Player 6 (Orange) to WolflingPlayer
Player Group - Add Player 7 (Green) to WolflingPlayer
Player Group - Add Player 9 (Gray) to WolflingPlayer
Player Group - Pick every player in WolflingPlayer and do (Actions)
Loop - Actions
-------- Setup for Dialog 1 --------
Dialog - Clear HeroDialog1
Dialog - Change the title of HeroDialog1 to Choose your Worg
Dialog - Create a dialog button for HeroDialog1 labelled Brutewolf
Set VariableSet DialogButtons[1] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog1 labelled Magewolf
Set VariableSet DialogButtons[2] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog1 labelled Shieldwolf
Set VariableSet DialogButtons[3] = (Last created dialog Button)
Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
Loop - Actions
Dialog - Show HeroDialog1 for (Picked player)
-
DoDialog
Events
Dialog - A dialog button is clicked for HeroDialog1
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to DialogButtons[5]
Then - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to DialogButtons[10]
Then - Actions
Dialog - Change the title of HeroDialog1 to Choose a Hero (1/2)
Dialog - Show HeroDialog1 for (Triggering player)
Skip remaining actions
Else - Actions
-------- Create the chosen Hero --------
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to DialogButtons[(Integer A)]
Then - Actions
Unit - Create 1 Heroes[(Integer A)] for (Triggering player) at (Center of wolf spawn <gen>) facing Default building facing degrees
Hero - Set Name of (Last created unit) to (Name of (Owner of (Last created unit)))
Selection - Select (Last created unit) for (Triggering player)
Game - Display to (Player group((Triggering player))) the text: (Name of (Last created unit))
Game - Display to WolflingPlayer the text: You are a Worg cub ...
Else - Actions