Request Simple heal spell

Status
Not open for further replies.
Level 10
Joined
Apr 3, 2006
Messages
535
Could someone post a triggered GUI spell that healls for X5 of the casters intelligence value.

Many thanks, and +rep of course
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
  • SimpleHeal
    • Events
      • Unit - A unit starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to *your ability*
    • Actions
      • Unit - Set life of (Target unit of ability being cast) to ((Leben of (Target unit of ability being cast)) + ((Real((Intelligence of (Triggering unit) (Exclude bonuses)))) x 5.00))
      • Special Effect - Create a special effect attached to the origin of (Target unit of ability being cast) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
      • Special Effect - Destroy (Last created special effect)
Here you go
 
Level 10
Joined
Apr 3, 2006
Messages
535
sorry to be an absolute pain could you put this into a map and upload it please, im having problems with the unit - set life bit - im a noob i know lol
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
No


Look:

You want to heal the unit.
Therefore you need to get the unit's current health, which is (Life of (Target unit of ability being cast) [sorry for forgetting to translate], correct?
And you have to add the amount you want to heal

Healing by 10 HP would be
  • Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + 10)
Now as you want to base the healing amount off the hero's intelligence, you need to know that Attributes (Strength, Agility and Intelligence) are INTEGERS.
So we need to convert the integer to REAL (which is a hexadecimal number like 123.45 or 0.00).

Now you want to heal it by: intelligence*5 - that is
(Intelligence of (Triggering unit) (Exclude bonuses) x 5.0

Put all that together and you'll have the above action
 
Level 10
Joined
Apr 3, 2006
Messages
535
lol its its that easy then could someone just put it in a map for me so i can learn from it
 
Level 10
Joined
Apr 3, 2006
Messages
535
Thanks very much its exactly what I needed, and extra bonus points for the text display of the points healed, thanks again rep
 
Status
Not open for further replies.
Top