rodead
Active Member
- Reaction score
- 42
here is the code of my spell and the following thing is not working, the efects and everything work fine but the spell needs to heal but it doesn't
Sends a Holy Light into the air that will explode and heal all units in 450 AoE every second 1*intelligence/5 of The Light Keeper
Thanks in advanced and +rep if you solve the problem!
Sends a Holy Light into the air that will explode and heal all units in 450 AoE every second 1*intelligence/5 of The Light Keeper
Code:
Holy Explosion 1
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Light Explosion
Actions
Set Holy_Explosion_Unit[((Player number of (Owner of (Casting unit))) + 24)] = (Casting unit)
Set Holy_Explosion[(Player number of (Owner of (Casting unit)))] = True
Set Holy_Explosion_Loc[(Player number of (Owner of (Casting unit)))] = (Position of (Casting unit))
Unit - Create 1 Holy Explosion 2 for (Owner of (Casting unit)) at Holy_Explosion_Loc[(Player number of (Owner of (Casting unit)))] facing Default building facing degrees
Set Holy_Explosion_Unit[((Player number of (Owner of (Casting unit))) + 12)] = (Last created unit)
Unit - Order Holy_Explosion_Unit[((Player number of (Owner of (Casting unit))) + 12)] to Neutral Alchemist - Healing Spray Holy_Explosion_Loc[(Player number of (Owner of (Casting unit)))]
Unit - Create 1 Holy Explosion for (Owner of (Casting unit)) at Holy_Explosion_Loc[(Player number of (Owner of (Casting unit)))] facing Default building facing degrees
Set Holy_Explosion_Unit[(Player number of (Owner of (Casting unit)))] = (Last created unit)
Animation - Change Holy_Explosion_Unit[(Player number of (Owner of (Casting unit)))] flying height to 400.00 at 50.00
Unit - Add a 7.00 second Generic expiration timer to Holy_Explosion_Unit[((Player number of (Owner of (Casting unit))) + 12)]
Unit - Add a 7.00 second Generic expiration timer to Holy_Explosion_Unit[(Player number of (Owner of (Casting unit)))]
Custom script: call RemoveLocation (udg_Holy_Explosion_Loc[1])
Custom script: call RemoveLocation (udg_Holy_Explosion_Loc[2])
Custom script: call RemoveLocation (udg_Holy_Explosion_Loc[3])
Custom script: call RemoveLocation (udg_Holy_Explosion_Loc[4])
Custom script: call RemoveLocation (udg_Holy_Explosion_Loc[5])
Custom script: call RemoveLocation (udg_Holy_Explosion_Loc[6])
Custom script: call RemoveLocation (udg_Holy_Explosion_Loc[7])
Custom script: call RemoveLocation (udg_Holy_Explosion_Loc[8])
Custom script: call RemoveLocation (udg_Holy_Explosion_Loc[9])
Custom script: call RemoveLocation (udg_Holy_Explosion_Loc[10])
Custom script: call RemoveLocation (udg_Holy_Explosion_Loc[11])
Custom script: call RemoveLocation (udg_Holy_Explosion_Loc[12])
Code:
Holy Explosion 2
Events
Unit - A unit Stops casting an ability
Conditions
(Ability being cast) Equal to Light Explosion
Actions
Unit - Remove Holy_Explosion_Unit[(Player number of (Owner of (Casting unit)))] from the game
Unit - Remove Holy_Explosion_Unit[((Player number of (Owner of (Casting unit))) + 12)] from the game
Set Holy_Explosion[(Player number of (Owner of (Casting unit)))] = False
Custom script: call RemoveLocation (udg_Holy_Explosion_Loc[1])
Custom script: call RemoveLocation (udg_Holy_Explosion_Loc[2])
Custom script: call RemoveLocation (udg_Holy_Explosion_Loc[3])
Custom script: call RemoveLocation (udg_Holy_Explosion_Loc[4])
Custom script: call RemoveLocation (udg_Holy_Explosion_Loc[5])
Custom script: call RemoveLocation (udg_Holy_Explosion_Loc[6])
Custom script: call RemoveLocation (udg_Holy_Explosion_Loc[7])
Custom script: call RemoveLocation (udg_Holy_Explosion_Loc[8])
Custom script: call RemoveLocation (udg_Holy_Explosion_Loc[9])
Custom script: call RemoveLocation (udg_Holy_Explosion_Loc[10])
Custom script: call RemoveLocation (udg_Holy_Explosion_Loc[11])
Custom script: call RemoveLocation (udg_Holy_Explosion_Loc[12])
Code:
Holy Explosion 3
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
Set Holy_Explosion_Group[(Integer A)] = (Units within 450.00 of Holy_Explosion_Loc[(Integer A)])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Holy_Explosion[(Integer A)] Equal to True
Then - Actions
Unit Group - Pick every unit in Holy_Explosion_Group[(Integer A)] and do (Actions)
Loop - Actions
Game - Display to (All players) the text: (String((Integer A)))
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + ((Real((Intelligence of Holy_Explosion_Unit[((Integer A) + 24)] (Include bonuses)))) / 5.00))
Else - Actions
Custom script: call DestroyGroup (udg_Holy_Explosion_Group[bj_forLoopAIndex])
Thanks in advanced and +rep if you solve the problem!