- Joined
- Jan 17, 2009
- Messages
- 372
Hi,
I recently made a trigger for an ability attack and for some reason nothing is working, i have a feeling a messed up somewhere, or multiple places and was hoping that someone could point out my mistakes.
Sidenote: How do i get the angle for a knockback?
I recently made a trigger for an ability attack and for some reason nothing is working, i have a feeling a messed up somewhere, or multiple places and was hoping that someone could point out my mistakes.
Sidenote: How do i get the angle for a knockback?
-
Ability Attack
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Attack
-
-
Actions
-
Unit - Order (Triggering unit) to Stop
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
A_Index[1] Equal to 0
-
-
Then - Actions
-
Trigger - Turn on Attack Loop <gen>
-
-
Else - Actions
-
-
Set A_Index[1] = (A_Index[1] + 1)
-
Set A_Index[2] = (A_Index[2] + 1)
-
Set A_LoopIsOn[A_Index[2]] = True
-
Set Unit[A_Index[2]] = (Triggering unit)
-
Custom script: call SetUnitAnimationByIndex(udg_Unit[udg_A_Index[2]], GetRandomInt(5, 6))
-
-
-
Attack Loop
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer A_Index[A_Index[3]]) from 1 to A_Index[2], do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Life of Unit[A_Index[3]]) Less than 0.01
-
-
Then - Actions
-
Set A_Index[1] = (A_Index[1] - 1)
-
Set TimingInt[A_Index[3]] = 0
-
Set A_LoopIsOn[A_Index[3]] = False
-
Animation - Reset Unit[A_Index[3]]'s animation
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
A_Index[1] Equal to 0
-
-
Then - Actions
-
Set A_Index[2] = 0
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
A_LoopIsOn[A_Index[3]] Equal to True
-
-
Then - Actions
-
Set TimingInt[A_Index[3]] = (TimingInt[A_Index[3]] + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TimingInt[A_Index[3]] Greater than 17
-
TimingInt[A_Index[3]] Less than 25
-
-
Then - Actions
-
Set TempLoc = (Position of Unit[A_Index[3]])
-
Set TempLoc2 = (TempLoc offset by 10.00 towards (Facing of Unit[A_Index[3]]) degrees)
-
Set TempPoint = (TempLoc offset by 75.00 towards (Facing of Unit[A_Index[3]]) degrees)
-
Set A_Region[A_Index[3]] = (Region centered at TempPoint with size (128.00, 128.00))
-
Set A_UnitGroup[A_Index[3]] = (Units in A_Region[A_Index[3]])
-
Unit Group - Pick every unit in A_UnitGroup[A_Index[3]] and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) is alive) Equal to True
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
K_Index[1] Equal to 0
-
-
Then - Actions
-
Trigger - Turn on Knockback <gen>
-
-
Else - Actions
-
-
Set K_Index[1] = (K_Index[1] + 1)
-
Set K_Index[2] = (K_Index[2] + 1)
-
Set K_LoopIsOn[K_Index[2]] = True
-
Set K_Unit[K_Index[2]] = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TimingInt[A_Index[3]] Equal to 25
-
-
Then - Actions
-
Unit - Cause Unit[A_Index[3]] to damage (Picked unit), dealing 50.00 damage of attack type Normal and damage type Normal
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
-
Unit - Move Unit[A_Index[3]] instantly to TempLoc2
-
Custom script: call RemoveLocation(udg_TempLoc)
-
Custom script: call RemoveLocation(udg_TempLoc2)
-
Custom script: call RemoveLocation(udg_TempPoint)
-
Custom script: call RemoveRect(udg_A_Region[udg_A_Index[3]])
-
Custom script: call DestroyGroup(udg_A_UnitGroup[udg_A_Index[3]])
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TimingInt[A_Index[3]] Equal to 35
-
-
Then - Actions
-
Set A_Index[1] = (A_Index[1] - 1)
-
Set TimingInt[A_Index[3]] = 0
-
Set A_LoopIsOn[A_Index[3]] = False
-
Animation - Reset Unit[A_Index[3]]'s animation
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
A_Index[1] Equal to 0
-
-
Then - Actions
-
Set A_Index[2] = 0
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
-
-