- Joined
- Jul 23, 2009
- Messages
- 1,033
I am trying to make a spell that shoots a projectile that travels to the target location. This is working as intended but when it is supposed to deal damage it gets out of hand.
Here is the first trigger for casting the spell (I will fix MUI, leaks etc later)
Here is the first trigger for casting the spell (I will fix MUI, leaks etc later)
-
Hammer of Light Cast Test
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to (==) Hammer of Light
-
Actions
- Set HoL_Caster = (Triggering unit)
- Set HoL_Target_Loc = (Target point of ability being cast)
- Set HoL_Angle = (Angle from (Position of HoL_Caster) to HoL_Target_Loc)
- Unit - Create 1 Hammer of Light Dummy for Player 1 (Red) at (Position of HoL_Caster) facing HoL_Angle degrees
- Set HoL_Dummy = (Last created unit)
- Set HoL_LifeTime = 500.00
-
Events
-
Hammer of Light Dummy Move Test
-
Events
- Time - Every 0.03 seconds of game time
-
Conditions
- (HoL_Dummy is alive) Equal to (==) True
-
Actions
- Set HoL_Dummy_Loc = (Position of HoL_Dummy)
- Unit - Move HoL_Dummy instantly to (HoL_Dummy_Loc offset by 20.00 towards HoL_Angle degrees)
- Set HoL_LifeTime = (HoL_LifeTime - 20.00)
-
Unit Group - Pick every unit in (Units within 100.00 of HoL_Dummy_Loc) and do (Actions)
-
Loop - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of (Picked unit)) Equal to (==) Neutral Hostile
-
Then - Actions
- Unit - Cause HoL_Caster to damage (Picked unit), dealing 100.00 damage of attack type Spells and damage type Normal
- Unit - Kill HoL_Dummy
- Else - Actions
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- HoL_LifeTime Less than or equal to (<=) 0.00
-
Then - Actions
- Unit - Kill HoL_Dummy
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
Events