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

Saving Real numbers to a unit.

Status
Not open for further replies.
Level 4
Joined
Oct 4, 2013
Messages
67
Well i think i cant use that in my spell i wanted to create an aura spell in which whenever a unit goes under the effect of the aura will save a real number to it, and it needs the level of the spell for the formula.

LsAuraTrigger.jpg



Can this be moved to the Trigger and Script Section??
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
^You need to store the enum unit or picked unit into the variable because you use it so many times, Anyway why did you destroy the group for?, Use [TRIGGER][/TRIGGER] tags instead of just screenshot it. Are you using UnitIndexer? store the GetUnitUserData ( udg_PickedUnit ) into the variable. Maybe showing the full triggers.
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
I mean why you destroy the tempgroup[0] if you're looping it every 0.03 seconds when not setted before in the loop?/
If you will only need it once then put the group into the execution, not in the loop. But if you want it to loop it every 0.03 seconds then put it in the loop without destroying the group because destroying the group will make the group destroyed and will not loop through-in anymore.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Instead of saving the level of spell, why not you just save the actual value that needs to be saved ?
Like, you want to save the level of spell aura because you need to multiply it with 5, how about your store the calculated value ?

Also, does your map allows the unit possessing this aura to be more than one in the game's life time ?

Example:
Hero A comes near a unit, and gains Level 2 Aura.
Hero B comes near a unit and Hero A, both unit and Hero A gets Level 3 Aura (based on current Level of Hero B - the highest).

Is that scenario possible in your map ?
 
Status
Not open for further replies.
Top