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

Issuing "Damage Taken" to a variable?

Status
Not open for further replies.
Level 2
Joined
Aug 14, 2006
Messages
17
I have a small problem concerning my recent spell. Voodoo Doll, it has probably been attempted before and succeeded but I still want to learn more about the possibilities the WE has to offer. Anyway.
When you use the event "A unit takes damage" it wants you to use an existing variable, an already placed unit on the map, but I want it as a UnitVariable.
Is there any way of doing this? I tried it by using JASS, I changed the value that specifies what unit and replaced with udg_MyUnit but when I tested it, it did nothing.

// Thanks in beforehand
 
Level 2
Joined
Aug 14, 2006
Messages
17
It worked perfectly to just add the event, cause then it will take all unit variables instead of the ones already existing in the map. The JASS method seems a bit complicated... wish I knew more. Anyway, thanks again! =D
 
Level 2
Joined
Aug 14, 2006
Messages
17
Oh, haha :p.
But it's good to do it with the event way first, so that I can get a general perspective of my spell, then when I'm done I can adjust it :p

Also, isn't there some sort of custom script you can put in instead, like call DestroyEvent or something?
 
Level 2
Joined
Aug 14, 2006
Messages
17
.. how do I do that? >.<

Edit: Ah :p Never mind, just remembered that you gave me a link on how to make it leak safe

Edit: Wait a minute.... I'm using the same variable over and over again... That means I do not need the big script, I just add the event once and I'm done =D
 
Last edited:
Status
Not open for further replies.
Top