• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Hero Evolution

Status
Not open for further replies.
i am useing a trigger where a hero levels to lvl 30 and it is replaced (can do that bit) but i am trying to use a dialog to pick what you evolve into next here is the trigger i have got so far
  • Events
    • Unit - A unit Gains a level
  • Conditions
    • (Unit-type of (Leveling Hero)) Equal to Kobold
    • (Hero level of (Leveling Hero)) Greater than or equal to 30
  • Actions
    • Dialog - Clear Dialog
    • Dialog - Change the title of Dialog to Pick your evolution
    • Dialog - Create a dialog button for Dialog labelled Kobold Worrior
    • Set DialogeButton[1] = (Last created dialog Button)
    • Dialog - Create a dialog button for Dialog labelled Kobold Geomancer
    • Set DialogeButton[2] = (Last created dialog Button)
    • Dialog - Show Dialog for (Owner of (Leveling Hero))
  • Events
    • Dialog - A dialog button is clicked for Dialog
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Clicked dialog button) Equal to DialogeButton[1]
      • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Clicked dialog button) Equal to DialogeButton[1]
      • Then - Actions
        • Unit - Replace (Leveling Hero) with a Kobold Worrior using The old unit's relative life and mana
        • Selection - Select (Last created unit) for (Owner of (Leveling Hero))
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Clicked dialog button) Equal to DialogeButton[2]
      • Then - Actions
        • Unit - Replace (Leveling Hero) with a Kobold Geomancer using The old unit's relative life and mana
        • Selection - Select (Last replaced unit) for (Owner of (Leveling Hero))
      • Else - Actions
but i cant get it to work +rep to whoever can solve my problem first
 
Use Triggering unit instead of Levelling Hero as they are the same thing except Triggering unit is more bug-free.

Store that inside a variable and use that variable in your Dialog trigger.

Example:
You stored it in the variable MyCoolHero.
In the dialog trigger, the replacement would be like this:
  • Unit - Replace MyCoolHero with a Kobold Worrior using The old unit's relative life and mana
Also, your second trigger doesn't need the first if-then-else. The selection should be outside and at the bottom of the if-then-else since it will be done regardless of which hero was chosen.
 
Status
Not open for further replies.
Top