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

Hero Overload!

Status
Not open for further replies.
Level 3
Joined
Oct 23, 2008
Messages
36
I need some help. I made a map, Fire Emblem wars. (attached) and the triggers, though innefficient work. The problem is that every unit is a hero. About the middle of the game, when units with items die, the items the unit was holding drop. I think it's becuase the game dosen't store that many heros. How can I fix this? I tried removing them from the game.
Thanks!
 

Attachments

  • Fire Emblem Middle Fort.w3x
    1.7 MB · Views: 37
all this does is create a temporary variable that stores the dying hero within the function, and 2 seconds later removes the unit stored in the variable.

By using a temporary variable (local), we can ensure it never removes the wrong unit, and can be run in multiple instances at the same time (MUI)

Hope that makes sense.

To implement it you'd just copy paste the function into the map header and then as an action do CustomScript: call removeHeroesDelayed() with the event "a unit dies"
 
Status
Not open for further replies.
Top