• 🏆 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!

Auto Revive Spell

Status
Not open for further replies.
Level 6
Joined
Jan 2, 2015
Messages
171
Hi everyone, i would like to make revive spell that when unit dies it will activated automatically. So when caster cast Auto-Life spell on other unit..this unit will get buff named Auto Life and get the reincarnation spell when attacked. I make the reincarnation spell added when unit is attacked because i dont know how the game check when unit has Auto Life buff so its safe to add reincarnation when unit is attacked and have Auto Life buff. My Problem is when unit dies..it will revived automatically but i cant remove this reincarnation spell from revived unit. I want reincarnation only available when unit have this auto life buff and removed when the buff expires or unit dies.

heres my trigger but not successfull

  • ressurection
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacked unit) has buff Auto Life ) Equal to True
    • Actions
      • Set auto revive = (Attacked unit)
      • Unit - Add Reincarnation (Cairne) to auto revive
  • revive remove
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Reincarnation (Cairne)
    • Actions
      • Unit - Remove Reincarnation (Cairne) from (Triggering unit)
anyone have idea how to remove this reincarnation after unit activated auto life or remove when the buff is expire?? thanks
 
Level 35
Joined
Feb 5, 2009
Messages
4,560
Give the reincarnation ability to the unit from the beginning, adding it when it's attacked is rather pointless.

As for removing it after use, that is a problem related to there being no ingame condition that allows you to tell when reincarnation has been used.

Fortunately, Bribe has coded a way of getting around that.

Link: Unit Event

In the description you will find details on how to transfer this system to your map - follow them to the letter and everything will work perfectly.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Use a buff system.
You give reincarnation ability when you cast the spell on a unit.
When the buff is removed, you remove the spell as well.

Use Bribe's Unit Event to detect when it activates/ends to remove the buff and the ability so you wont have the buff after you were reincarnated.

You should be adding a spellbook that contains the reincarnation and disable the spellbook to hide the button.

I guess this should work fine.
 
Level 6
Joined
Jan 2, 2015
Messages
171
it solved some of my problem but i cant solve how to remove the reincarnation when the buff expire. Bribe system solve my problem when unit reincarnated..the reincarnation spell will be removed until the caster cast Auto Life again on a unit.
 
Level 35
Joined
Feb 5, 2009
Messages
4,560
I have a buff/ability link system that was created for my by Illidan(evil)x some time ago, it is in vjass but it does exactly what you need - if a unit has a specific buff, it will have an assigned ability until the buff expires.

Would you like to have it? It will require you to use newgen World Editor.
 
Status
Not open for further replies.
Top