- Joined
- May 11, 2010
- Messages
- 278
This is part of my trigger
It runs on a time loop of 0.02 seconds. It's a knockback ability. After about 0.5 seconds, it stops running even though there's still time left on ProjectileLifetime. It doesn't show any of the "test" messages.
I've heard that too many "If/Then/Else"s in the same trigger can cause errors. Might this be because of that or is something else wrong?
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
ASysProjectileLifetime[ASysLoopInt] Greater than 0.00
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in ASysKnockedTargets[ASysLoopInt]) Greater than or equal to 1
-
-
Then - Actions
-
Set ASysProjectileLifetime[ASysLoopInt] = (ASysProjectileLifetime[ASysLoopInt] - 0.02)
-
Game - Display to (All players) the text: (String(ASysProjectileLifetime[ASysLoopInt]))
-
Unit Group - Pick every unit in ASysKnockedTargets[ASysLoopInt] and do (Actions)
-
Loop - Actions
-
Set TempPoint = (Position of (Picked unit))
-
Set TempPoint2 = (TempPoint offset by ASysProjectileSpeed[ASysLoopInt] towards ASysKnockAngle[ASysLoopInt] degrees)
-
Unit - Move (Picked unit) instantly to TempPoint2
-
Custom script: call RemoveLocation(udg_TempPoint)
-
Custom script: call RemoveLocation(udg_TempPoint2)
-
-
-
-
Else - Actions
-
Game - Display to (All players) the text: test 1
-
Set ASysAttackComplete[ASysLoopInt] = True
-
-
-
-
Else - Actions
-
Game - Display to (All players) the text: test 2
-
Unit Group - Pick every unit in ASysKnockedTargets[ASysLoopInt] and do (Actions)
-
Loop - Actions
-
Unit - Unpause (Picked unit)
-
Unit Group - Remove (Picked unit) from ASysKnockedTargets[ASysLoopInt]
-
-
-
Set ASysAttackComplete[ASysLoopInt] = True
-
-
I've heard that too many "If/Then/Else"s in the same trigger can cause errors. Might this be because of that or is something else wrong?