• 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 for changing heroes

Status
Not open for further replies.
Level 28
Joined
Jan 26, 2007
Messages
4,789
  • Change Hero
    • Events
      • Unit - A unit enters HeroChanger <gen>
    • Conditions
      • (Hero level of (Triggering unit)) Greater than or equal to 10
      • ((Triggering unit) has an item of type ITEM_TYPE) Equal to True
      • (Unit-type of (Triggering unit)) Equal to HERO_TYPE
    • Actions
      • Set TempLoc = (Position of (Triggering unit))
      • Set TempExp = (Hero experience of (Triggering unit))
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item carried by (Triggering unit) in slot (Integer A))) Not equal to ITEM_TYPE
            • Then - Actions
              • Set TempItem[(Integer A)] = (Item-type of (Item carried by (Triggering unit) in slot (Integer A)))
            • Else - Actions
      • Unit - Remove (Triggering unit) from the game
      • Unit - Create 1 CHANGE_TYPE for (Owner of (Triggering unit)) at TempLoc facing 0.00 degrees
      • Set Hero[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
      • Hero - Set (Last created unit) experience to TempExp, Hide level-up graphics
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Hero - Create TempItem[(Integer A)] and give it to (Last created unit)
      • Selection - Select (Last created unit) for (Owner of (Triggering unit))
      • Custom script: call RemoveLocation(udg_TempLoc)
HERO_TYPE is the hero type of the first hero (the one that walks into the circle).
ITEM_TYPE is the item type of the item required to... evolve, or whatever.
CHANGE_TYPE is the hero type of the final hero (the evolution).

These are NOT variables!
 
Status
Not open for further replies.
Top