• 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.

Move hero after all units are dead.

Status
Not open for further replies.
Level 1
Joined
Sep 23, 2011
Messages
1
I am designing a Arena map with phases; a wave of ghouls, 2 mins to spend in a town area where they can upgrade and itemize things.

My question, what is the basic means of causing my hero to instant Move, when the last unit dies, (not a specific unit) but just the last unit in a region to die?

Any ideas?

Thanks much,
Dave
 
Something like this:
  • Death
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Region 000 <gen> contains (Triggering unit)) Equal to True
    • Actions
      • Set Group = (Units in Region 000 <gen> matching ((((Matching unit) is alive))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Group) Equal to 0
        • Then - Actions
          • Set Point1 = (Random point in (Playable map area))
          • Unit - Move Hero instantly to Point1
          • Custom script: call RemoveLocation (udg_Point1)
        • Else - Actions
      • Custom script: call DestroyGroup (udg_Group)
For questions like this, visit World Editor Help Zone instead or Triggers and Scripts if you need help with editing triggers.
 
Status
Not open for further replies.
Top