- Joined
- Jul 25, 2011
- Messages
- 1,065
My trigger is leaking I don't know what's leaking in my trigger please help me.
PS:It leaks when a bullet is alive.
[TRIGGER=Shoot]Shoot
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Shoot
Actions
Set TP1 = (Position of (Triggering unit))
Unit - Create 1 Bullet for (Owner of (Triggering unit)) at TP1 facing (Facing of (Triggering unit)) degrees
Unit - Add a 0.80 second Generic expiration timer to (Last created unit)
Unit Group - Add (Last created unit) to Bullets
Custom script: call RemoveLocation(udg_TP1)
[/TRIGGER]
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Shoot
Actions
Set TP1 = (Position of (Triggering unit))
Unit - Create 1 Bullet for (Owner of (Triggering unit)) at TP1 facing (Facing of (Triggering unit)) degrees
Unit - Add a 0.80 second Generic expiration timer to (Last created unit)
Unit Group - Add (Last created unit) to Bullets
Custom script: call RemoveLocation(udg_TP1)
[/TRIGGER]
-
Shoot Loop
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in Bullets and do (Actions)
-
Loop - Actions
- Set Bullet = (Picked unit)
- Set TP1 = (Position of (Picked unit))
- Set TP2 = (TP1 offset by 50.00 towards (Facing of (Picked unit)) degrees)
- Unit - Move (Picked unit) instantly to TP2
- Set TG = (Units within 50.00 of TP1)
- Custom script: call RemoveLocation(udg_TP1)
- Custom script: call RemoveLocation(udg_TP2)
-
Unit Group - Pick every unit in TG and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of (Picked unit)) Equal to (Owner of Bullet)
- Then - Actions
-
Else - Actions
- Unit - Cause Bullet to damage (Picked unit), dealing (Random real number between 50.00 and 60.00) damage of attack type Spells and damage type Normal
- Unit - Kill Bullet
- Special Effect - Create a special effect attached to the chest of (Picked unit) using Objects\Spawnmodels\Human\HumanBlood\HumanBloodKnight.mdl
- Special Effect - Destroy (Last created special effect)
- Unit Group - Remove Bullet from Bullets
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Set Bullet = No unit
- Custom script: call DestroyGroup(udg_TG)
-
Loop - Actions
-
Unit Group - Pick every unit in Bullets and do (Actions)
-
Events
-
Bullet Death
-
Events
- Unit - A unit Dies
-
Conditions
- (Unit-type of (Triggering unit)) Equal to Bullet
-
Actions
- Unit Group - Remove (Triggering unit) from Bullets
-
Events