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

Yet anonther spell not working

Status
Not open for further replies.
Level 3
Joined
Oct 8, 2004
Messages
31
I am trying to make a spell in which a unit dies and then is reincarnated as a different unit, but of the same lvl and set with the lvl of abilities that the old unit had. I set the reicarnation ability to be the base ability for graphics purposes. Then I went into triggers and created the following.

Trigger 1
Name - Spell Reincarnation

Event:
Unit - a unit learns a skill

Conditions:
(learned hero skill) equal to Special reincarnation.

Action:
Trigger - run turn on replace unit <gen>


Trigger 2
Name - replace unit

Event: Unit - my preset unit <gen>'s life becomes less than or equal to 0.00

Conditions:

Actions:
Unit - Replace (triggering unit) with a hero ghoul using the new unit's default life and mana.
Hero - set(last created unit) hero-level to (hero lvl of (triggering unit)), hide lvl up graphics.

When I run this trigger, it creates 3 units instead of only 1. Also if someone can figure out the trigger to set ability of last created unit to the lvl of ability of triggering unit that would be good too. And if someone could tell me how to have the trigger target any unit instead of the preplaced one (i.e. my present unit <gen>) that would be very helpful also. thank you for your help.
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
Umm... no offense but your method sucks hardly. Nope, it's not a solution. Just use the following trigger.

Event - an unit is attacked
Conditions - Attacked unit has yourability equal to true
Actions - Wait 1.00 seconds.
- IF-Then-Else:
If attacked unit is dead equal to true
Remove attacked unit.
Create Yourunit at position of attacked unit.

Hmm... Hope that works though it should be tested first. Some commands still look fishy.
 
Level 3
Joined
Oct 8, 2004
Messages
31
Yes, that seems much simpler. tho if you remove a hero, will it consider it dead and make that hero reviveable? I wouldnt like the old hero to appear in a tavern or be considered dead for all intensive purposes.
 
Status
Not open for further replies.
Top