• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Vampiric Kiss. <Spell help>

Status
Not open for further replies.

Cateater

C

Cateater

<sigh> I have another problem. i am trying to make a spell called vampiric kiss. essentially it drains the life of the unit and transfers it to the caster, kind of like life drain except it isnt a channeling spell. It is because of this similarity that i based it off drain life but it wont work. it will deal the right amount of dmg but wont trasfer any of it to the caster. Does ne1 have suggestions on what needs to done or a better spell to base vampiric kiss off of?
 
make a trigger registering the spell event(like always)
then use a periodic timer and a struct storing caster and target as well as amount(e.g. 75.*GetUnitAbilityLevel(caster,id))
let the timer run and every intervall u have a callback function which takes the arguments from the struct(TimerUtils needed for this)
then go for
JASS:
SetUnitState( target , UNIT_STATE_LIFE , GetUnitState( target , UNIT_STATE_LIFE) - amount)
SetUnitState( caster , UNIT_STATE_LIFE , GetUnitState( caster , UNIT_STATE_LIFE) + amount)
 
hmm. Guess im learnig Jass. Dosnt look too hard cuz i understood most of what was wrote. Thx for the help!
 
Status
Not open for further replies.
Back
Top