Deep thought
New Member
- Reaction score
- 1
I have a trigger that I think is leaking, but I cannot figure out why. Help?
Also, is it possible to make an ability not interrupt the units current action, like, for example, walking?
Trigger:
- BulletMovers
- Events
- Time - Every 0.06 seconds of game time
- Conditions
- Actions
- For each (Integer A) from 0 to 160, do (Actions)
- Loop - Actions
- Set Bullet_Point[(Integer A)] = (Position of Bullets_Units[(Integer A)])
- Set Bullet_Point_Offset[(Integer A)] = (Bullet_Point[(Integer A)] offset by 40.00 towards Bullet_Angle[(Integer A)] degrees)
- Unit - Move Bullets_Units[(Integer A)] instantly to Bullet_Point_Offset[(Integer A)]
- Unit - Move Bullets_Units_Checkers[(Integer A)] instantly to Bullet_Point_Offset[(Integer A)]
- Set Bullet_LeakUnitGroup[(Integer A)] = (Units within 40.00 of Bullet_Point_Offset[(Integer A)] matching (((((Matching unit) is A flying unit) Equal to False) and ((Owner of (Matching unit)) Equal to Bullet_CastingPlayer[(Integer A)])) and (((Unit-type of (Matching unit)) Equal to Bullet) and ((Uni
- Unit Group - Pick every unit in Bullet_LeakUnitGroup[(Integer A)] and do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Number of units in Bullet_LeakUnitGroup[(Integer A)]) Greater than 0
- Then - Actions
- Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 50.00)
- Set Bullet_DebugUnit = (Last created unit)
- Unit - Remove Bullets_Units[(Integer A)] from the game
- Unit - Remove Bullets_Units_Checkers[(Integer A)] from the game
- Set Bullets_SeekerUnits[(Player number of Bullet_CastingPlayer[(Integer A)])] = (Picked unit)
- Set Bullet_IsAlive[(Integer A)] = False
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- Custom script: call DestroyGroup(udg_Bullet_LeakUnitGroup[GetForLoopIndexA()])
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Bullets_Units[(Integer A)] Equal to No unit
- Then - Actions
- Set Bullet_LeakUnitGroup[(Integer A)] = (Units within 50.00 of Bullet_Point_Offset[(Integer A)] matching ((Unit-type of (Matching unit)) Equal to Bullet))
- Unit Group - Pick every unit in Bullet_LeakUnitGroup[(Integer A)] and do (Actions)
- Loop - Actions
- Unit - Remove (Picked unit) from the game
- Loop - Actions
- Custom script: call DestroyGroup(udg_Bullet_LeakUnitGroup[GetForLoopIndexA()])
- Set Bullet_LeakUnitGroup[(Integer A)] = (Units within 50.00 of Bullet_Point_Offset[(Integer A)] matching ((Unit-type of (Matching unit)) Equal to Bullet Collision Checker))
- Unit Group - Pick every unit in Bullet_LeakUnitGroup[(Integer A)] and do (Actions)
- Loop - Actions
- Unit - Remove (Picked unit) from the game
- Loop - Actions
- Custom script: call DestroyGroup(udg_Bullet_LeakUnitGroup[GetForLoopIndexA()])
- Else - Actions
- If - Conditions
- Set Bullet_Point_Offset_Checker[(Integer A)] = (Position of Bullets_Units_Checkers[(Integer A)])
- Custom script: call RemoveLocation (udg_Bullet_Point[GetForLoopIndexA()])
- Custom script: call RemoveLocation (udg_Bullet_Point_Offset[GetForLoopIndexA()])
- Custom script: call RemoveLocation (udg_Bullet_Point_Offset_Checker[GetForLoopIndexA()])
- Loop - Actions
- For each (Integer A) from 0 to 160, do (Actions)
- Events
Also, is it possible to make an ability not interrupt the units current action, like, for example, walking?