wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Warcraft III Modding > Developer's Corner > Triggers & Scripts
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 09-19-2014, 08:21 PM   #1
Ryuusei
User
 
Ryuusei's Avatar
 
Join Date: Sep 2014
Posts: 5

Ryuusei has little to show at this moment (0)

Default Hero selection using dialog boxes

Hello there!

First and foremost, this is my first post here. So, I am glad to be among people that know more than me. Hopefully, I can learn a a few things.

Now, onto business.

I have never really looked at the map editor before. I normally just played the maps that others have made. However, I have suddenly taken an interest in making an ORPG of my own, using concepts from other maps then incorporating them together (such as hero skill purchasing in the Hero Builder arenas, save and load from almost all ORPG maps, and freedom like the DoBRP series). So far, I have not gotten far, as I have been trying to get the kink out of a trigger system I am trying to create.

To put it simply, a player types -heroselect into chat, and it brings up a dialog box. It has 4 options: Humanoid, Undead, Demonic, and Elemental. Each of those buttons goes to another dialog box, each containing 3 more buttons. And, each of those buttons goes to ANOTHER dialog box containing 4 buttons each (for those keeping track, that's a total of 64 buttons and 17 boxes). It's like a flow chat layout, to put it simply.

Anyway. I got the dialog boxes setup, and the buttons have their appropriate integer values in the DialogButtons variable. The buttons works up to a certain point. I can get to the last dialogs of the categories, but when I click on the button to create that hero, the dialog closes, but no hero is created.

Here is the trigger I have for the hero creation.
Trigger:
Humanoid
Collapse Events
Dialog - A dialog button is clicked for DialogHeroTypeMenu
Dialog - A dialog button is clicked for DialogHumanMenu
Dialog - A dialog button is clicked for DialogHumanStr
Dialog - A dialog button is clicked for DialogHumanAgi
Dialog - A dialog button is clicked for DialogHumanInt
Conditions
Collapse Actions
-------- Switch to Humanoid --------
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Clicked dialog button) Equal to DialogButtons[1]
Collapse Then - Actions
Dialog - Change the title of DialogHeroTypeMenu to Choose your stat ar...
Dialog - Show DialogHumanMenu for (Triggering player)
Skip remaining actions
Else - Actions
-------- Switch to Str --------
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Clicked dialog button) Equal to DialogButtons[5]
Collapse Then - Actions
Dialog - Change the title of DialogHumanMenu to Choose your Hero
Dialog - Show DialogHumanStr for (Triggering player)
Collapse Else - Actions
Skip remaining actions
-------- Switch to Agi --------
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Clicked dialog button) Equal to DialogButtons[6]
Collapse Then - Actions
Dialog - Change the title of DialogHumanMenu to Choose your Hero
Dialog - Show DialogHumanAgi for (Triggering player)
Collapse Else - Actions
Skip remaining actions
-------- Switch to Int --------
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Clicked dialog button) Equal to DialogButtons[7]
Collapse Then - Actions
Dialog - Change the title of DialogHumanMenu to Choose your Hero
Dialog - Show DialogHumanInt for (Triggering player)
Collapse Else - Actions
Skip remaining actions
-------- Creating Hero --------
Collapse For each (Integer A) from 1 to 4, do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Clicked dialog button) Equal to DialogButtons[(Integer A)]
Collapse Then - Actions
Unit - Create 1 Heroes[1] for (Triggering player) at (Center of unit spawn <gen>) facing Default building facing (270.0) degrees
Selection - Select (Last created unit) for (Triggering player)
Camera - Pan camera for (Triggering player) to (Position of (Last created unit)) over 0.00 seconds
Game - Display to (Player group((Triggering player))) the text: Your hero has been ...
Else - Actions

I got this trigger from a tutorial over at world-editor-tutorials. While the tutorial in their example is for a 2 dialog system while my system is 17, I would think that the basic principles would be the same.

Assistance in this matter would be greatly appreciated.

--Ryuusei

P.S. On a side note, if anyone know how to trigger so that when a player types the -heroselect, it doesn't appear in chat, that would be lovely.
Ryuusei is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 09-19-2014, 11:55 PM   #2
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,189

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

I am guessing that you are using dialogue buttons 1-4 for race selection, 5-16 for stat selection for each race, and the rest for hero selection. In that case, your problem is that in your loop, you are checking again for buttons 1-4 instead of buttons 17-64.
__________________
Anitarf is offline   Reply With Quote
Old 09-20-2014, 10:11 AM   #3
Ryuusei
User
 
Ryuusei's Avatar
 
Join Date: Sep 2014
Posts: 5

Ryuusei has little to show at this moment (0)

Default

Alright. I'll give that a try when I am back at home and can work on it.

Also, if that is the case here, then I will have to redo the button integers. I currently have them set so that humanoid is 1, then 5 - 19, undead is 2, then 20 - 34, and so on for the other 2. From what I am gathering from your solution, I need to streamline the buttons so that the hero buttons at the end are all in consecutive order.

I'll get right on that when I can.

Thanks!
Ryuusei is offline   Reply With Quote
Old 09-20-2014, 11:56 AM   #4
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,189

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

Quote:
Originally Posted by Ryuusei
From what I am gathering from your solution, I need to streamline the buttons so that the hero buttons at the end are all in consecutive order.
Not necessarily. Your trigger already first checks if a race or stat button was pressed, so there can be no error if those buttons are also included in the loop; if one of them was pressed, the trigger will stop before it even gets to the loop anyway. So, functionally the order could stay the same but I would still change it because that makes more sense in terms of code organisation.

In fact, I would use separate arrays for race, stat and hero buttons, although functionally there is nothing wrong with consolidating them all into one array like you did.

Furthermore, you could generalise your code even more. You already did it with heroes, using a loop and a unit type array instead of a separate if statement for each hero. You could use a similar solution for races and stats. Again, what you have now can work but there's more to good code than just working correctly.

I don't think you need a separate stat menu for each race. Since the stats are the same for all races, you could also use a single menu for all of them.
__________________
Anitarf is offline   Reply With Quote
Old 09-23-2014, 03:50 AM   #5
Ryuusei
User
 
Ryuusei's Avatar
 
Join Date: Sep 2014
Posts: 5

Ryuusei has little to show at this moment (0)

Default

Alright.

I went ahead and changed the menus around so that the race and stat selection menus have buttons 1-16, and the hero buttons are now 17-64, and changed the setting for each button array to match. However, I am still unable to get the hero to spawn when the appropriate button is clicked in the dialog menus.

Current trigger layout is as follows:

Trigger:
Humanoid
Collapse Events
Dialog - A dialog button is clicked for DialogHeroTypeMenu
Dialog - A dialog button is clicked for DialogHumanMenu
Dialog - A dialog button is clicked for DialogHumanStr
Dialog - A dialog button is clicked for DialogHumanAgi
Dialog - A dialog button is clicked for DialogHumanInt
Conditions
Collapse Actions
-------- Switch to Humanoid --------
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Clicked dialog button) Equal to DialogButtons[1]
Collapse Then - Actions
Dialog - Change the title of DialogHeroTypeMenu to Choose your stat ar...
Dialog - Show DialogHumanMenu for (Triggering player)
Skip remaining actions
Else - Actions
-------- Switch to Str --------
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Clicked dialog button) Equal to DialogButtons[5]
Collapse Then - Actions
Dialog - Change the title of DialogHumanMenu to Choose your Hero
Dialog - Show DialogHumanStr for (Triggering player)
Collapse Else - Actions
Skip remaining actions
-------- Switch to Agi --------
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Clicked dialog button) Equal to DialogButtons[6]
Collapse Then - Actions
Dialog - Change the title of DialogHumanMenu to Choose your Hero
Dialog - Show DialogHumanAgi for (Triggering player)
Collapse Else - Actions
Skip remaining actions
-------- Switch to Int --------
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Clicked dialog button) Equal to DialogButtons[7]
Collapse Then - Actions
Dialog - Change the title of DialogHumanMenu to Choose your Hero
Dialog - Show DialogHumanInt for (Triggering player)
Collapse Else - Actions
Skip remaining actions
-------- Creating Hero --------
Collapse For each (Integer A) from 17 to 28, do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Clicked dialog button) Equal to DialogButtons[(Integer A)]
Collapse Then - Actions
Unit - Create 1 Heroes[(Integer A)] for (Triggering player) at (Center of unit spawn <gen>) facing Default building facing degrees
Selection - Select (Last created unit) for (Triggering player)
Camera - Pan camera for (Triggering player) to (Position of (Last created unit)) over 0.00 seconds
Game - Display to (Player group((Triggering player))) the text: Your hero has been ...
Else - Actions

The changes from the original trigger to this one are; Changed Integer A to be from 17 to 28, as those are the human hero buttons. I also changed the Heroes array to [(Integer A)] instead of [(1)] like it was before. However, with these changes, the heroes are still not spawning.

If need be, I can post all of the triggers I have made so that any inconsistencies with the them can be seen and corrected.
Ryuusei is offline   Reply With Quote
Old 09-23-2014, 06:42 AM   #6
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,189

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

Yeah, I'll need to see the triggers in which you set up your button and hero arrays, I can't find the error looking just at this code. You could also add some debug messages to your loop to see where it is going wrong (does it even run? if it does, does it ever get to the then-actions of the if statement?). I see you already have one game message after the hero is supposed to spawn, does that game message show up?

By the way, why are you changing the title of a menu after a player presses a button on it?

Also, there is an action for displaying a text to a single player, you don't need to do it to a player group. Right now, you are creating a new player group every time you display a text message. Of course, that's such a small memory leak that it doesn't really matter, but if you're going to be using triggers a lot it might become important later, so I'm mentioning it now. Usually, the problem aren't player groups, but unit groups and locations. For example, you are also creating a location when you create the hero (the "center of region" creates a new location every time it is used).
__________________
Anitarf is offline   Reply With Quote
Old 09-23-2014, 05:06 PM   #7
Ryuusei
User
 
Ryuusei's Avatar
 
Join Date: Sep 2014
Posts: 5

Ryuusei has little to show at this moment (0)

Default

Alright. Here are the triggers as follows:

Please note that some of the comments in the triggers are unedited, as the actions were copypasta from one trigger to another. However, comments are irrelevant to trigger functions. So, no harm, no foul.

Hero array: (note that these are all placeholders, but shouldn't affect functionality)
Trigger:
Hero Array
Collapse Events
Map initialization
Conditions
Collapse Actions
Set Heroes[1] = Paladin
Set Heroes[2] = Mountain King
Set Heroes[3] = Bandit Lord
Set Heroes[4] = Captain
Set Heroes[5] = Demon Hunter
Set Heroes[6] = Warden
Set Heroes[7] = Sylvanas Windrunner
Set Heroes[8] = Spell Breaker
Set Heroes[9] = Archmage
Set Heroes[10] = Sorceress
Set Heroes[11] = Keeper of the Grove
Set Heroes[12] = Blood Mage
Set Heroes[13] = Death Knight
Set Heroes[14] = Skeleton Warrior
Set Heroes[15] = Zombie
Set Heroes[16] = Abomination
Set Heroes[17] = Ghoul
Set Heroes[18] = Skeleton Archer
Set Heroes[19] = Gargoyle
Set Heroes[20] = Dark Ranger
Set Heroes[21] = Lich
Set Heroes[22] = Banshee
Set Heroes[23] = Necromancer
Set Heroes[24] = Shade
Set Heroes[25] = Blood Mage
Set Heroes[26] = Blood Mage
Set Heroes[27] = Blood Mage
Set Heroes[28] = Blood Mage
Set Heroes[29] = Blood Mage
Set Heroes[30] = Blood Mage
Set Heroes[31] = Blood Mage
Set Heroes[32] = Blood Mage
Set Heroes[33] = Blood Mage
Set Heroes[34] = Blood Mage
Set Heroes[35] = Blood Mage
Set Heroes[36] = Blood Mage
Set Heroes[37] = Blood Mage
Set Heroes[38] = Blood Mage
Set Heroes[39] = Blood Mage
Set Heroes[40] = Blood Mage
Set Heroes[41] = Blood Mage
Set Heroes[42] = Blood Mage
Set Heroes[43] = Blood Mage
Set Heroes[44] = Blood Mage
Set Heroes[45] = Blood Mage
Set Heroes[46] = Blood Mage
Set Heroes[47] = Blood Mage
Set Heroes[48] = Blood Mage

Human menu:
Trigger:
DialogHuman
Collapse Events
Time - Elapsed game time is 2.00 seconds
Conditions
Collapse Actions
-------- MENU 2 (Humanoid) --------
Dialog - Clear DialogHumanMenu
Dialog - Change the title of DialogHumanMenu to Choose an attribute...
Dialog - Create a dialog button for DialogHumanMenu labelled Strength
Set DialogButtons[5] = (Last created dialog Button)
Dialog - Create a dialog button for DialogHumanMenu labelled Agility
Set DialogButtons[6] = (Last created dialog Button)
Dialog - Create a dialog button for DialogHumanMenu labelled Intellect
Set DialogButtons[7] = (Last created dialog Button)
-------- MENU 3 (HumanStr) --------
Dialog - Clear DialogHumanStr
Dialog - Change the title of DialogHumanStr to Choose your Hero
Dialog - Create a dialog button for DialogHumanStr labelled Paladin
Set DialogButtons[17] = (Last created dialog Button)
Dialog - Create a dialog button for DialogHumanStr labelled Mountain King
Set DialogButtons[18] = (Last created dialog Button)
Dialog - Create a dialog button for DialogHumanStr labelled Bandit Lord
Set DialogButtons[19] = (Last created dialog Button)
Dialog - Create a dialog button for DialogHumanStr labelled Captain of the Guar...
Set DialogButtons[20] = (Last created dialog Button)
-------- MENU 4 (HumanAgi) --------
Dialog - Clear DialogHumanAgi
Dialog - Change the title of DialogHumanAgi to Choose your Hero
Dialog - Create a dialog button for DialogHumanAgi labelled Demon Hunter
Set DialogButtons[21] = (Last created dialog Button)
Dialog - Create a dialog button for DialogHumanAgi labelled Warden
Set DialogButtons[22] = (Last created dialog Button)
Dialog - Create a dialog button for DialogHumanAgi labelled Ranger General
Set DialogButtons[23] = (Last created dialog Button)
Dialog - Create a dialog button for DialogHumanAgi labelled Spell Breaker
Set DialogButtons[24] = (Last created dialog Button)
-------- MENU 5 (HumanInt) --------
Dialog - Clear DialogHumanInt
Dialog - Change the title of DialogHumanInt to Choose your Hero
Dialog - Create a dialog button for DialogHumanInt labelled Archmage
Set DialogButtons[25] = (Last created dialog Button)
Dialog - Create a dialog button for DialogHumanInt labelled Sorceress
Set DialogButtons[26] = (Last created dialog Button)
Dialog - Create a dialog button for DialogHumanInt labelled Keeper of the Grove
Set DialogButtons[27] = (Last created dialog Button)
Dialog - Create a dialog button for DialogHumanInt labelled Blood Mage
Set DialogButtons[28] = (Last created dialog Button)

Menus:
HUMAN
Trigger:
DialogHuman
Collapse Events
Time - Elapsed game time is 2.00 seconds
Conditions
Collapse Actions
-------- MENU 2 (Humanoid) --------
Dialog - Clear DialogHumanMenu
Dialog - Change the title of DialogHumanMenu to Choose an attribute...
Dialog - Create a dialog button for DialogHumanMenu labelled Strength
Set DialogButtons[5] = (Last created dialog Button)
Dialog - Create a dialog button for DialogHumanMenu labelled Agility
Set DialogButtons[6] = (Last created dialog Button)
Dialog - Create a dialog button for DialogHumanMenu labelled Intellect
Set DialogButtons[7] = (Last created dialog Button)
-------- MENU 3 (HumanStr) --------
Dialog - Clear DialogHumanStr
Dialog - Change the title of DialogHumanStr to Choose your Hero
Dialog - Create a dialog button for DialogHumanStr labelled Paladin
Set DialogButtons[17] = (Last created dialog Button)
Dialog - Create a dialog button for DialogHumanStr labelled Mountain King
Set DialogButtons[18] = (Last created dialog Button)
Dialog - Create a dialog button for DialogHumanStr labelled Bandit Lord
Set DialogButtons[19] = (Last created dialog Button)
Dialog - Create a dialog button for DialogHumanStr labelled Captain of the Guar...
Set DialogButtons[20] = (Last created dialog Button)
-------- MENU 4 (HumanAgi) --------
Dialog - Clear DialogHumanAgi
Dialog - Change the title of DialogHumanAgi to Choose your Hero
Dialog - Create a dialog button for DialogHumanAgi labelled Demon Hunter
Set DialogButtons[21] = (Last created dialog Button)
Dialog - Create a dialog button for DialogHumanAgi labelled Warden
Set DialogButtons[22] = (Last created dialog Button)
Dialog - Create a dialog button for DialogHumanAgi labelled Ranger General
Set DialogButtons[23] = (Last created dialog Button)
Dialog - Create a dialog button for DialogHumanAgi labelled Spell Breaker
Set DialogButtons[24] = (Last created dialog Button)
-------- MENU 5 (HumanInt) --------
Dialog - Clear DialogHumanInt
Dialog - Change the title of DialogHumanInt to Choose your Hero
Dialog - Create a dialog button for DialogHumanInt labelled Archmage
Set DialogButtons[25] = (Last created dialog Button)
Dialog - Create a dialog button for DialogHumanInt labelled Sorceress
Set DialogButtons[26] = (Last created dialog Button)
Dialog - Create a dialog button for DialogHumanInt labelled Keeper of the Grove
Set DialogButtons[27] = (Last created dialog Button)
Dialog - Create a dialog button for DialogHumanInt labelled Blood Mage
Set DialogButtons[28] = (Last created dialog Button)
UNDEAD
Trigger:
DialogUndead
Collapse Events
Time - Elapsed game time is 1.00 seconds
Conditions
Collapse Actions
-------- MENU 2 (Humanoid) --------
Dialog - Clear DialogUndeadMenu
Dialog - Change the title of DialogUndeadMenu to Choose an attribute...
Dialog - Create a dialog button for DialogUndeadMenu labelled Strength
Set DialogButtons[8] = (Last created dialog Button)
Dialog - Create a dialog button for DialogUndeadMenu labelled Agility
Set DialogButtons[9] = (Last created dialog Button)
Dialog - Create a dialog button for DialogUndeadMenu labelled Intellect
Set DialogButtons[10] = (Last created dialog Button)
-------- MENU 3 (HumanStr) --------
Dialog - Clear DialogUndeadStr
Dialog - Change the title of DialogUndeadStr to Choose your Hero
Dialog - Create a dialog button for DialogUndeadStr labelled Death Knight
Set DialogButtons[29] = (Last created dialog Button)
Dialog - Create a dialog button for DialogUndeadStr labelled Skeleton Guard
Set DialogButtons[30] = (Last created dialog Button)
Dialog - Create a dialog button for DialogUndeadStr labelled Zombie Lord
Set DialogButtons[31] = (Last created dialog Button)
Dialog - Create a dialog button for DialogUndeadStr labelled Construct
Set DialogButtons[32] = (Last created dialog Button)
-------- MENU 4 (HumanAgi) --------
Dialog - Clear DialogUndeadAgi
Dialog - Change the title of DialogUndeadAgi to Choose your Hero
Dialog - Create a dialog button for DialogUndeadAgi labelled Rogue Ghoul
Set DialogButtons[33] = (Last created dialog Button)
Dialog - Create a dialog button for DialogUndeadAgi labelled Skeletal Archer
Set DialogButtons[34] = (Last created dialog Button)
Dialog - Create a dialog button for DialogUndeadAgi labelled Obsidian Gargoyle
Set DialogButtons[35] = (Last created dialog Button)
Dialog - Create a dialog button for DialogUndeadAgi labelled Dark Ranger
Set DialogButtons[36] = (Last created dialog Button)
-------- MENU 5 (HumanInt) --------
Dialog - Clear DialogUndeadInt
Dialog - Change the title of DialogUndeadInt to Choose your Hero
Dialog - Create a dialog button for DialogUndeadInt labelled Arch Lich
Set DialogButtons[37] = (Last created dialog Button)
Dialog - Create a dialog button for DialogUndeadInt labelled Banshee Mistress
Set DialogButtons[38] = (Last created dialog Button)
Dialog - Create a dialog button for DialogUndeadInt labelled Necrolord
Set DialogButtons[39] = (Last created dialog Button)
Dialog - Create a dialog button for DialogUndeadInt labelled Deathly Shade
Set DialogButtons[40] = (Last created dialog Button)
ELEMENTAL
Trigger:
DialogElemental
Collapse Events
Time - Elapsed game time is 1.00 seconds
Conditions
Collapse Actions
-------- MENU 2 (Humanoid) --------
Dialog - Clear DialogEleMenu
Dialog - Change the title of DialogEleMenu to Choose an attribute...
Dialog - Create a dialog button for DialogEleMenu labelled Strength
Set DialogButtons[11] = (Last created dialog Button)
Dialog - Create a dialog button for DialogEleMenu labelled Agility
Set DialogButtons[12] = (Last created dialog Button)
Dialog - Create a dialog button for DialogEleMenu labelled Intellect
Set DialogButtons[13] = (Last created dialog Button)
-------- MENU 3 (HumanStr) --------
Dialog - Clear DialogEleStr
Dialog - Change the title of DialogEleStr to Choose your Hero
Dialog - Create a dialog button for DialogEleStr labelled Earthen Golem
Set DialogButtons[41] = (Last created dialog Button)
Dialog - Create a dialog button for DialogEleStr labelled Aqua Guardian
Set DialogButtons[42] = (Last created dialog Button)
Dialog - Create a dialog button for DialogEleStr labelled Lava Lord
Set DialogButtons[43] = (Last created dialog Button)
Dialog - Create a dialog button for DialogEleStr labelled Zephyr
Set DialogButtons[44] = (Last created dialog Button)
-------- MENU 4 (HumanAgi) --------
Dialog - Clear DialogEleAgi
Dialog - Change the title of DialogEleAgi to Choose your Hero
Dialog - Create a dialog button for DialogEleAgi labelled Treant of the Fores...
Set DialogButtons[45] = (Last created dialog Button)
Dialog - Create a dialog button for DialogEleAgi labelled Coral Elemental
Set DialogButtons[46] = (Last created dialog Button)
Dialog - Create a dialog button for DialogEleAgi labelled Firehawk
Set DialogButtons[47] = (Last created dialog Button)
Dialog - Create a dialog button for DialogEleAgi labelled Whirlwind
Set DialogButtons[48] = (Last created dialog Button)
-------- MENU 5 (HumanInt) --------
Dialog - Clear DialogEleInt
Dialog - Change the title of DialogEleInt to Choose your Hero
Dialog - Create a dialog button for DialogEleInt labelled Grassland Guardian
Set DialogButtons[49] = (Last created dialog Button)
Dialog - Create a dialog button for DialogEleInt labelled Tidal Lord
Set DialogButtons[50] = (Last created dialog Button)
Dialog - Create a dialog button for DialogEleInt labelled Firelord
Set DialogButtons[51] = (Last created dialog Button)
Dialog - Create a dialog button for DialogEleInt labelled Tempest
Set DialogButtons[52] = (Last created dialog Button)
DEMONIC
Trigger:
DialogDemonic
Collapse Events
Time - Elapsed game time is 1.00 seconds
Conditions
Collapse Actions
-------- MENU 2 (Humanoid) --------
Dialog - Clear DialogDemonMenu
Dialog - Change the title of DialogDemonMenu to Choose an attribute...
Dialog - Create a dialog button for DialogDemonMenu labelled Strength
Set DialogButtons[14] = (Last created dialog Button)
Dialog - Create a dialog button for DialogDemonMenu labelled Agility
Set DialogButtons[15] = (Last created dialog Button)
Dialog - Create a dialog button for DialogDemonMenu labelled Intellect
Set DialogButtons[16] = (Last created dialog Button)
-------- MENU 3 (HumanStr) --------
Dialog - Clear DialogDemonStr
Dialog - Change the title of DialogDemonStr to Choose your Hero
Dialog - Create a dialog button for DialogDemonStr labelled Pit Fiend
Set DialogButtons[53] = (Last created dialog Button)
Dialog - Create a dialog button for DialogDemonStr labelled Doom Lord
Set DialogButtons[54] = (Last created dialog Button)
Dialog - Create a dialog button for DialogDemonStr labelled Infernal Commander
Set DialogButtons[55] = (Last created dialog Button)
Dialog - Create a dialog button for DialogDemonStr labelled Eredar Brute
Set DialogButtons[56] = (Last created dialog Button)
-------- MENU 4 (HumanAgi) --------
Dialog - Clear DialogDemonAgi
Dialog - Change the title of DialogDemonAgi to Choose your Hero
Dialog - Create a dialog button for DialogDemonAgi labelled Maiden of Pain
Set DialogButtons[57] = (Last created dialog Button)
Dialog - Create a dialog button for DialogDemonAgi labelled Fel Stalker
Set DialogButtons[58] = (Last created dialog Button)
Dialog - Create a dialog button for DialogDemonAgi labelled Void Fiend
Set DialogButtons[59] = (Last created dialog Button)
Dialog - Create a dialog button for DialogDemonAgi labelled Nether Walker
Set DialogButtons[60] = (Last created dialog Button)
-------- MENU 5 (HumanInt) --------
Dialog - Clear DialogDemonInt
Dialog - Change the title of DialogDemonInt to Choose your Hero
Dialog - Create a dialog button for DialogDemonInt labelled Eredar Warlock
Set DialogButtons[61] = (Last created dialog Button)
Dialog - Create a dialog button for DialogDemonInt labelled Nether Drake
Set DialogButtons[62] = (Last created dialog Button)
Dialog - Create a dialog button for DialogDemonInt labelled Voidwalker
Set DialogButtons[63] = (Last created dialog Button)
Dialog - Create a dialog button for DialogDemonInt labelled Legion General
Set DialogButtons[64] = (Last created dialog Button)

Also, I see what you are saying about the menu titles. I went ahead and deleted those actions to prevent redundancy.

As for how far I get in the menus: I can go as far as the final menu where the hero buttons are clicked, but the hero will not spawn, and the text and camera pans do not occur.
Ryuusei is offline   Reply With Quote
Old 09-24-2014, 01:19 AM   #8
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,189

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

Ah, I finally noticed the error in the original trigger, in all your if statements except the first one, you put "skip remaining actions" under the "else - actions".

When storing hero types to the array, you should store them under an index that matches the index of their menu button, so for example Palladin should be stored under 17, not 1. Right now, once you fix the bug that's stopping the hero from spawning at all, you will still get the wrong hero.
__________________
Anitarf is offline   Reply With Quote
Old 09-24-2014, 02:18 PM   #9
Ryuusei
User
 
Ryuusei's Avatar
 
Join Date: Sep 2014
Posts: 5

Ryuusei has little to show at this moment (0)

Default

SUCCESS!

Thank you so much for all the help, Anitarf!

After an initial test with the skip remaining actions taken out, and units were spawning correctly, I went ahead and changed all of the hero array integers to their appropriate values, and the correct units are now spawning.

Thanks again for all the help (remembers to put in credit in map)
Ryuusei is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 10:56 PM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2018, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services