- Joined
- Jul 22, 2009
- Messages
- 213
Juste for exemple this is the spell when it's level 3:The Priestress absorb 4x her inteligence hit point to each enemy in a range of 550 and she redistribute it between all friendly unit around her.
What bad with this is when i cast it and there's no longer enemy it's heal the friendly unit. But only if i've casted it normaly(with enemy) before. Need help with this.
EDIT: I've upload the map if it can help you
-
Events
-

Unit - A unit Starts the effect of an ability
-
-
Conditions
-

(Ability being cast) Equal to Divine Intervention (priestress spell)
-
-
Actions
-

-------- I set some variable --------
-

Set CasterTEMP = (Casting unit)
-

Set PointTEMP = (Position of CasterTEMP)
-

Set PlayerTEMP = (Owner of CasterTEMP)
-

Set InteligenceTEMP = (Intelligence of CasterTEMP (Include bonuses))
-

Set SkillLevelTEMP = (Level of Divine Intervention (priestress spell) for CasterTEMP)
-

-------- The radius depend on skill level --------
-

Set RadiusTEMP = (100.00 x (Real(SkillLevelTEMP)))
-

Set RadiusTEMP = (RadiusTEMP + 250.00)
-

-------- The damage depend on skill lvl and inteligence --------
-

Set DamageTEMP = ((Real(SkillLevelTEMP)) + 1.00)
-

Set DamageTEMP = (DamageTEMP x (Real(InteligenceTEMP)))
-

-------- I set the enemy unit in a group --------
-

Set UnitGroupTEMP = (Units within RadiusTEMP of PointTEMP matching (((Owner of (Matching unit)) is an enemy of PlayerTEMP) Equal to True))
-

-------- Calcul how many unit in the group(used later) --------
-

Set UnitQtyTEMP[1] = (Number of units in UnitGroupTEMP)
-

Unit Group - Pick every unit in UnitGroupTEMP and do (Actions)
-


Loop - Actions
-



-------- Deal the damage based on value calculed before --------
-



Unit - Cause CasterTEMP to damage (Picked unit), dealing DamageTEMP damage of attack type Hero and damage type Normal
-
-
-

-------- Destroy group(i d'ont know if it's usefull here) --------
-

Custom script: call DestroyGroup(udg_UnitGroupTEMP)
-

-------- calcul how much damage in total was dealed to enemies --------
-

Set DamageTEMP = (DamageTEMP x (Real(UnitQtyTEMP[1])))
-

-------- I set the friendly unit in a group --------
-

Set UnitGroupTEMP = (Units within RadiusTEMP of PointTEMP matching (((Owner of (Matching unit)) is an ally of PlayerTEMP) Equal to True))
-

-------- Calcul how many unit in the group --------
-

Set UnitQtyTEMP[2] = (Number of units in UnitGroupTEMP)
-

-------- calcul the total damage dealt to enemies/number of friendly unit --------
-

Set DamageTEMP = (DamageTEMP / (Real(UnitQtyTEMP[2])))
-

Set DamageTEMPinteger = (Integer(DamageTEMP))
-

Unit Group - Pick every unit in UnitGroupTEMP and do (Actions)
-


Loop - Actions
-



Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + DamageTEMP)
-



Floating Text - Create floating text that reads (String(DamageTEMPinteger)) above (Picked unit) with Z offset 64.00, using font size 12.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
-



Set FloatingTextTEMP = (Last created floating text)
-



Floating Text - Set the velocity of FloatingTextTEMP to 60.00 towards 90.00 degrees
-



Floating Text - Change FloatingTextTEMP: Disable permanence
-



Floating Text - Change the lifespan of FloatingTextTEMP to 2.00 seconds
-



Floating Text - Change the fading age of FloatingTextTEMP to 1.70 seconds
-



Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Orc\HealingWave\HealingWaveTarget.mdl
-
-
-

Custom script: call DestroyGroup(udg_UnitGroupTEMP)
-

Custom script: call RemoveLocation(udg_PointTEMP)
-
EDIT: I've upload the map if it can help you







