• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Spawning a zombie on any unit's death point? (Zombie apocalypse)

Status
Not open for further replies.
Level 7
Joined
Mar 9, 2016
Messages
226
How do i let know the trigger editor where is the death point of any unit?
I want to create an effect when the unit dies in its location and summon a zombie.


0c37ca2f72714efeb74ff4a0b1011399.png
 
Level 8
Joined
Jan 28, 2016
Messages
486
This might sound crazy but you can reference dead units (not sure about heroes) with either variables or event responses (i.e.: Triggering Unit); just be sure to remove the location leak! Additionally, you can remove the wait between the special effect actions as most effect animations will still play even if you destroy them straight afterwards.

  • Wave Revive
    • Events
      • Unit - A unit Dies
    • Conditions
      • -------- Add your conditions here --------
    • Actions
      • Set TempLocation = (Position of (Triggering unit))
      • Special Effect - Create a special effect at TempLocation using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Create 1 Zombie for Player 11 (Dark Green) at TempLocation facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_TempLocation)

P.S.: You can use [TRIGGER][/TRIGGER] tags to post your triggers. These links should help: How to easily post triggers and BB Codes.
 
Level 7
Joined
Mar 9, 2016
Messages
226
Thanks for taking the time to help me out, are conditions required? Preferably i wouldn't use them at least for now. I'd set an event which would turn this trigger on.
 
Level 39
Joined
Feb 27, 2007
Messages
5,010
No conditions required. One caveat about the instant destroy, though: the animation that's played is the effect's death animation. For many things this works just fine, but if you (for example, I know it's dumb) used the footman.mdl it would show a dying footman.
 
Level 7
Joined
Mar 9, 2016
Messages
226
SetTemplocation should be a variable of what type? And how do i set the value to "position of triggering unit"? Kind of a noob here.. ^^

No conditions required. One caveat about the instant destroy, though: the animation that's played is the effect's death animation. For many things this works just fine, but if you (for example, I know it's dumb) used the footman.mdl it would show a dying footman.

Good to know, thanks.
 
Level 7
Joined
Mar 9, 2016
Messages
226
That is the normal event of your trigger. It will always run when ever a unit dies.

Or change the event, or add Conditions to the trigger (like checking for "UnitType" of "(TriggeringUnt)"), or change the event.
This actually helped me more than it seems, thanks a lot.
 
Level 7
Joined
Mar 9, 2016
Messages
226
You need a condition checking for the unit-type of the unit not being Zombie, or you're going to have Zombies spawning out of Zombies.
Yeah, figured that out. Though i decided to make custom zombies spawning from specific units, this also avoids spawning zombies from mechanical and flying units.
Thanks though.
 
Status
Not open for further replies.
Top