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

Status
Not open for further replies.
Level 6
Joined
Nov 28, 2007
Messages
203
well, you could save the unit into a game cache (i think it will work) and reload it again when you need it.
If you need help with game cache, then i can help.
 
[trigger="When a hero dies"]Events
Unit - A unit dies
Conditions
(Dying unit is a hero) Equal to True
Actions
Unit - Set custom value of (Dying unit) to (Player number of (Owner of (Dying unit)))
Unit - Change ownership of (Dying unit) to Neutral Passive, retaining original color[/trigger]

[trigger="Revive"]Events
Unit - A unit is revived
Conditions
(Triggering unit is a hero) equal to True
Actions
Unit - Change ownership of (Triggering unit) to (Player number (Custom value of (Triggering unit))), change color[/trigger]
 
So basically, when you cast the spell it creates a bunch of cloned heroes? That's easy, just do this.

Make two Unit variables: Cloner and Clone.

[trigger="When the spell is cast"]Events
Unit - A unit starts the effect of an ability
Conditions
Ability being cast is Equal to YourSpell
Actions
Set Cloner = (Casting Unit)[/trigger]

[trigger="When a hero dies"]Events
Unit - A unit dies
Conditions
(Unit type of (Dying unit)) is Equal to YourHero/CloneType
(Dying unit) is Not Equal to Cloner
Actions
Custom script: local unit udg_Clone = GetTriggerUnit()
-------- That "udg_" part means it's a global variable --------
Wait 6.00 seconds
Unit - Remove Clone from the game[/trigger]
 
Level 8
Joined
Dec 9, 2007
Messages
155
yea and how do u put it in the chat
and i fuigered it out
i think this will work
e-unit cast spell
c-spell = clone
a-creat unit x
-set special number of last cerated unit to 1


e-unit dies
c-special number of dying unit iis = to 1
a-remove dying unit
 
Level 3
Joined
Aug 24, 2007
Messages
33
Would mirror image work if you just remove the timer on the clones, and set their damage done/damage taken to 100%?

Or do you want to keep it off mirror image to avoid the blue color?
 
Status
Not open for further replies.
Top