garion992
TH.net Regular
- Reaction score
- 17
Hello everyone,
I have a big problem! I wanted to make a map like Herocraft but exept of using a Tavern for selecting heroes i want to use a Dialog for selecting heroes. It doesn't makes any heroes and the buttons to next page don't work too. Im not very good with dialogs and variables, soo please can someone help me
Note: i have made variables
-DialogButtons dialog button Array 30
-Heroes unit-type Array 30
-HeroDialog1 t/m 6
I have made those triggers:
I have a big problem! I wanted to make a map like Herocraft but exept of using a Tavern for selecting heroes i want to use a Dialog for selecting heroes. It doesn't makes any heroes and the buttons to next page don't work too. Im not very good with dialogs and variables, soo please can someone help me
Note: i have made variables
-DialogButtons dialog button Array 30
-Heroes unit-type Array 30
-HeroDialog1 t/m 6
I have made those triggers:
Code:
Melee Initialization
Events
Map initialization
Conditions
Actions
Melee Game - Use melee time of day (for all players)
-------- Hero List --------
Set Heroes[1] = Paladin
Set Heroes[2] = Archmage
Set Heroes[3] = Mountainking
Set Heroes[4] = Bloodmage
Set Heroes[5] = No unit-type
Set Heroes[6] = Blademaster
Set Heroes[7] = Blademaster
Set Heroes[8] = Blademaster
Set Heroes[9] = Blademaster
Set Heroes[10] = No unit-type
Set Heroes[11] = Blademaster
Set Heroes[12] = Blademaster
Set Heroes[13] = Blademaster
Set Heroes[14] = Blademaster
Set Heroes[15] = No unit-type
Set Heroes[16] = Blademaster
Set Heroes[17] = Blademaster
Set Heroes[18] = Blademaster
Set Heroes[19] = Blademaster
Set Heroes[20] = No unit-type
Set Heroes[21] = Blademaster
Set Heroes[22] = Blademaster
Set Heroes[23] = Blademaster
Set Heroes[24] = Blademaster
Set Heroes[25] = No unit-type
Set Heroes[26] = Blademaster
Set Heroes[27] = Blademaster
Set Heroes[28] = Blademaster
Set Heroes[29] = Blademaster
Set Heroes[30] = No unit-type
Code:
ShowSelectHeroDialog
Events
Time - Elapsed game time is 11.00 seconds
Conditions
Actions
-------- Setup for Dialog 1 --------
Dialog - Clear HeroDialog1
Dialog - Change the title of HeroDialog1 to Choose a Human Hero
Dialog - Create a dialog button for HeroDialog1 labelled Paladin
Set DialogButtons[1] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog1 labelled Archmage
Set DialogButtons[2] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog1 labelled Mountain King
Set DialogButtons[3] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog1 labelled Blood Mage
Set DialogButtons[4] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog1 labelled Go to page 2 >>>
Set DialogButtons[5] = (Last created dialog Button)
-------- Setup for Dialog 2 --------
Dialog - Clear HeroDialog2
Dialog - Change the title of HeroDialog2 to Choose a Orc Hero
Dialog - Create a dialog button for HeroDialog2 labelled Lich
Set DialogButtons[6] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog2 labelled Demon Hunter
Set DialogButtons[7] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog2 labelled Warden
Set DialogButtons[8] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog2 labelled Fire Lord
Set DialogButtons[9] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog2 labelled Go to page 3 >>>
Set DialogButtons[10] = (Last created dialog Button)
-------- Setup for Dialog 3 --------
Dialog - Clear HeroDialog3
Dialog - Change the title of HeroDialog3 to Choose a Night Elf ...
Dialog - Create a dialog button for HeroDialog3 labelled Lich
Set DialogButtons[11] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog3 labelled Lich
Set DialogButtons[12] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog3 labelled Lich
Set DialogButtons[13] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog3 labelled Lich
Set DialogButtons[14] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog2 labelled Go to page 4 >>>
Set DialogButtons[15] = (Last created dialog Button)
-------- Setup for Dialog 4 --------
Dialog - Clear HeroDialog4
Dialog - Change the title of HeroDialog4 to Choose a Undead Her...
Dialog - Create a dialog button for HeroDialog4 labelled Lich
Set DialogButtons[16] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog4 labelled Lich
Set DialogButtons[17] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog4 labelled Lich
Set DialogButtons[18] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog4 labelled Lich
Set DialogButtons[19] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog4 labelled Go to page 5 >>>
Set DialogButtons[20] = (Last created dialog Button)
-------- Setup for Dialog 5 --------
Dialog - Clear HeroDialog5
Dialog - Change the title of HeroDialog5 to Choose a Neutral He...
Dialog - Create a dialog button for HeroDialog5 labelled Lich
Set DialogButtons[21] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog5 labelled Lich
Set DialogButtons[22] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog5 labelled Lich
Set DialogButtons[23] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog5 labelled Lich
Set DialogButtons[24] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog5 labelled Lich
Set DialogButtons[25] = (Last created dialog Button)
-------- Setup for Dialog 6 --------
Dialog - Clear HeroDialog6
Dialog - Change the title of HeroDialog6 to Choose a Neutral He...
Dialog - Create a dialog button for HeroDialog6 labelled Lich
Set DialogButtons[26] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog6 labelled Lich
Set DialogButtons[27] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog6 labelled Lich
Set DialogButtons[28] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog6 labelled Lich
Set DialogButtons[29] = (Last created dialog Button)
Dialog - Create a dialog button for HeroDialog6 labelled Lich
Set DialogButtons[30] = (Last created dialog Button)
-------- Showing the dialog to all players --------
Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
Loop - Actions
Dialog - Show HeroDialog1 for (Picked player)
Code:
DoSelectHero
Events
Dialog - A dialog button is clicked for HeroDialog1
Dialog - A dialog button is clicked for HeroDialog2
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
Dialog - Show HeroDialog2 for (Triggering player)
Skip remaining 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 - Show HeroDialog1 for (Triggering player)
Skip remaining 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 - Show HeroDialog3 for (Triggering player)
Skip remaining 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 - Show HeroDialog1 for (Triggering player)
Skip remaining actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to DialogButtons[15]
Then - Actions
Dialog - Show HeroDialog4 for (Triggering player)
Skip remaining 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 - Show HeroDialog1 for (Triggering player)
Skip remaining actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to DialogButtons[20]
Then - Actions
Dialog - Show HeroDialog5 for (Triggering player)
Skip remaining 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 - Show HeroDialog1 for (Triggering player)
Skip remaining actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to DialogButtons[25]
Then - Actions
Dialog - Show HeroDialog6 for (Triggering player)
Skip remaining 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 - Show HeroDialog1 for (Triggering player)
Skip remaining actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Clicked dialog button) Equal to DialogButtons[30]
Then - Actions
Dialog - Show HeroDialog1 for (Triggering player)
Skip remaining 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 - Show HeroDialog1 for (Triggering player)
Skip remaining actions
Else - 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 ((Triggering player) start location) facing Default building facing degrees
Selection - Select (Last created unit) for (Triggering player)
Game - Display to (Player group((Triggering player))) the text: ((Name of (Triggering unit)) + is under your command!)
Else - Actions