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

Castable duration-based "LifeSteal"

Status
Not open for further replies.
Level 4
Joined
Nov 24, 2007
Messages
55
So I am running into a problem with the editor. I have an "idea" of how i Might be able to do it, but I am lost on some details. Here's my original intent (in case there is a more effective way to do this from the get go), and my current line of thought...

Original Intent:
I want this hero to be able to cast on himself (or ally) a buff that will let the unit essentially have a lifesteal (based on level of the ability, i.e. 10/20/30 % lifesteal for 3 levels.)

Working Idea:
I coudl only think of the Vampiric Auras and Orb effects to do this, so i searched the engine for all the "Vampiric" abilities to see if there was something else. I found the "Vampiric Poition", and re-tooled it for a hero ability with 3 levels, but when testing it, it force casts it on the hero himself (I am Guessing that this is becuase it is based on an item?), and am tryingto think of a work-around. So, I thoguht maybe i just have a trigger that gives the "Target Unit" this item and immediately use it, but i'd like to avoid (don't want to rely on an open inventory slot in case i Impelement items into this map). I am also considering using an insane amount of triggering, where a unit would be healed when attacking, basing the amount of healing on the level of the buff and the atk. dmg of the unit (rigging up my own "lifesteal".

If you coudl help out that would be great
 
Level 4
Joined
Nov 24, 2007
Messages
55
would you furhter explain this idea. I haven't used spellbook before (i'm fiddling around with it now) but i am a little confused as to how this would work.

--edit--
also, i want this to be recastable buff.

i.e., it gets cast, and goes for 12 seconds, then fades. then after a 30 second cooldown, it can be recast for another 12 seconds of lifesteal...will this way through "disableing" (i can't find quite what you mean byt his in the editor) allow this?
 
Last edited:
Level 21
Joined
Aug 21, 2005
Messages
3,699
Read the whole post, idiot.

Spellbook is an ability that allows you to have a tree of spells in 1 ability. Whenever you "cast" spellbook (when it's a unit ability, it's item on default), it opens a new "page" with 11 other abilities.
You could make a spellbook ability that contains "Vampiric Aura" as an ability, so whenever you add the spellbook ability, the unit also gains Vampiric Aura.

In the trigger editor there's an action like "Player - disable ability for player". This disables an ability, removing the icon (but not the actual ability) from all units owned by this player. However, there's a bug with the spellbook ability that removes the spellbook icon from the unit, but keeps the spells INSIDE the book active. In other words: disabling the spellbook ability on a unit adds the Vampiric Aura ability and its effects but hides the icon of Vampiric Aura.
12 seconds after casting the ability, you can simply remove your spellbook aiblity and the vampiric aura will be removed too.

Check the tutorials section for more info on spellbook secrets.
 
Level 4
Joined
Nov 24, 2007
Messages
55
Than you Eleandor. that is a very helpful answer. Question though, I've noticed with the Wait command that you often after it cannot access characters via the "Unit - Target Unit of Ability Being Cast" and "Triggering Unit" or the "Event Response" functions properly, as in they bug out.

It is the solution to this to use local variables so then after the 10/12 second wait, i jsut remove the ability from the local var?

Also, will this still work if the Hero is dead, or do i need to code in a special trigger to handle that state?

--edit--
Also, do I need to worry about re-enablying the ability for the player afterwards? Further, could i simply, upon initialization (although, this could be excessive,) simply disable the ability for all players?
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
Q1: Using local variables is required for this to be MUI.
Q2: No idea. I think removing the ability from the hero does work, but there's only 1 way to find out: try it.
Q3: You can disable the spellbook ability at map initialisation for all players. No re-enabling required AFAIK.
 
Status
Not open for further replies.
Top