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

Reincarnation

Status
Not open for further replies.
Level 4
Joined
Jul 18, 2008
Messages
73
spell

Event
Unit start effect of an ability
Conditions
Ability being cast = Inner fire
Actions
Add reincanation to (target unit of ability being cast)
wait 10 sec.
remove Reincrnation from (target unit of ability being cast)

need help on removing reincrnation when unit dies.
i tried everything :cry:
 
Level 6
Joined
Jun 8, 2008
Messages
256
First, store the unit in a variable as to avoid leaks.

Then make a trigger with the event "A unit dies", conditions; the unit is the variable-unit
And then just wait for the reincarnation to actually happen, and remove it.


  • Pie
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Triggering unit) Equal to YourUnit
    • Actions
      • Unit - Remove Reincarnation from YourUnit
      • Wait 5.00 seconds
I even took the time to do this!

"YourUnit" is the variable unit.
 
Level 9
Joined
Jan 15, 2008
Messages
235
  • Events
    • Unit - finish casting of ability
  • Conditions
    • Abillity being casted Equal to YourReincarnation
  • Actions
    • Unit - Remove YourReincarnation from CastingUnit
should work, if it doesnt try event unit start effect of ability (but then add wait 1st)
 
Level 2
Joined
Apr 8, 2009
Messages
21
This works for me,but only for single hits i think if the unit cast spell which includes all the hitpoints it won't work.

  • Reincernaction
    • Events
      • Unit - Paladin 0000 <gen>'s life becomes Less than 5.00
    • Conditions
    • Actions
      • Set casting_unit = Paladin 0000 <gen>
      • Unit - Remove Reincarnation from casting_unit
 
Level 16
Joined
May 1, 2008
Messages
1,605
Seas =)

Hmm its some other way but I can give you my, longer time ago, created revive Ability.

1: Create a Spell, basic "Inner Fire" and rename it in <what you want>
- I named it: Revive

2: Create a Variable:
- Name: YourUnit / Type: Unit

3: Create 2 Trigger:

  • Buff Unit
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Revive
    • Actions
      • Set YourUnit = (Target unit of ability being cast)
  • Buffed Unit Die
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Dying unit) Equal to YourUnit
    • Actions
      • Wait 2.00 seconds
      • Hero - Instantly revive YourUnit at (Position of YourUnit), Show revival graphics
      • Unit - Set mana of (Reviving Hero) to X%
Why I did this way?
- If the "Revive Spell" got more levels, you can increase the duration of the Ability and this can be usefull as well.
- If you add reincanation to a Unit/Hero with already full spell inventory, it can be complicated.
- If the "Revive Spell" got more levels, you can add more mana for the reviving Unit.

Hmm ofc its tested and works fine =)

! You will need the Part "Unit - Set mana of (Reviving Hero) to X%" or the Unit gets only the Mana Initial Amount !

Mfg
Dr. Boom
 
Level 11
Joined
Feb 16, 2009
Messages
760
What bugs me is the following:
Set YourUnit = (Target unit of ability being cast)
Then you use these actions
(Dying unit) Equal to YourUnit
Actions
Wait 2.00 seconds
Hero - Instantly revive YourUnit at (Position of YourUnit), Show revival graphics

Not only your trigger leaks, if a second priest cast inner fire on a other guy, the first unit will not be revived
 
Level 8
Joined
Nov 9, 2008
Messages
502
So basically this ability will give the unit a momentary reincarnation?

you should check if the unit has a buff when it dies, then revive it through triggers.

You could do this but you would still get the "your hero has died" message, even though he is about to revive.

I wonder why Reincarnation can't be removed? Have you edited Reincarnation to be a Unit ability rather than a Hero ability? Is the problem that you try to remove it while unit is still dead? If so you can add
  • Wait until (((Triggering unit) is alive) Equal to True), checking every 0.20 seconds
after your 10 second wait.

P.S. If you want to make simple triggers MUI you can use a local variable, like so:
  • Untitled Trigger 002
    • Events
    • Conditions
    • Actions
      • Custom script: local unit udg_AUnitVariable
      • Set AUnitVariable = (Target unit of ability being cast)
      • Wait 10.00 seconds
      • -------- Your Actions Here --------
      • Custom script: set udg_AUnitVariable = null
local variables
 
Level 4
Joined
Jul 18, 2008
Messages
73
It doesn't work - reincarnation behaves very differently for the precise reason that it is not treated as a death - it doesn't give xp, bounty, etc, or trigger death events.


Events
Unit starts effect of an abylity
Conditions
Ability being cast = to Revive
Actions
Set Revived = Target unit of ability being cast
Add Reincarnation to Revived
Wait 100 seconds
Remove Reincarnation from Revived

i works :\

and i gave reincarnation like 300 sec cooldown
 
Status
Not open for further replies.
Top