XDogg
New Member
- Reaction score
- 0
Ok I have a trigger like so:
So When I added a
- Special Effect - Destroy (Last created special effect)
It instantly removes the special effect not showing anything.
So I tried to cure it this way:
Leak Check still sees it as leaking (telling me to add Special Effect - Destroy (Last created special effect)), but I think it's fixed not sure... If it's still leaking any advise as to how to get this working leak free?
EDITED
Hrmm It said this is leakfree...
But dont I have to do a custom script to remove LastEffect varible?
Trigger:
- Bomb Level 1
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Bomb 1-8
- (Level of Bomb 1-8 for (Triggering unit)) Equal to 1
- Actions
- Set MyLocation = (Position of (Triggering unit))
- Unit - Create 1 Blast Bomb 1 for (Owner of (Triggering unit)) at MyLocation facing Default building facing degrees
- Custom script: call RemoveLocation(udg_MyLocation)
- Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
- Special Effect - Create a special effect attached to the overhead of (Last created unit) using Abilities\Spells\Orc\AncestralSpirit\AncestralSpiritCaster.mdl
- Events
So When I added a
- Special Effect - Destroy (Last created special effect)
It instantly removes the special effect not showing anything.
So I tried to cure it this way:
Trigger:
- Bomb Level 1
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Bomb 1-8
- (Level of Bomb 1-8 for (Triggering unit)) Equal to 1
- Actions
- Set MyLocation = (Position of (Triggering unit))
- Unit - Create 1 Blast Bomb 1 for (Owner of (Triggering unit)) at MyLocation facing Default building facing degrees
- Custom script: call RemoveLocation(udg_MyLocation)
- Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
- Special Effect - Create a special effect attached to the overhead of (Last created unit) using Abilities\Spells\Orc\AncestralSpirit\AncestralSpiritCaster.mdl
- Wait until (((Last created unit) is dead) Equal to True), checking every 1.00 seconds
- Special Effect - Destroy (Last created special effect)
- Events
Leak Check still sees it as leaking (telling me to add Special Effect - Destroy (Last created special effect)), but I think it's fixed not sure... If it's still leaking any advise as to how to get this working leak free?
EDITED
Hrmm It said this is leakfree...
Trigger:
- Bomb Level 1
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Bomb 1-8
- (Level of Bomb 1-8 for (Triggering unit)) Equal to 1
- Actions
- Set MyLocation = (Position of (Triggering unit))
- Unit - Create 1 Blast Bomb 1 for (Owner of (Triggering unit)) at MyLocation facing Default building facing degrees
- Custom script: call RemoveLocation(udg_MyLocation)
- Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
- Special Effect - Create a special effect attached to the overhead of (Last created unit) using Abilities\Spells\Orc\AncestralSpirit\AncestralSpiritCaster.mdl
- Set LastEffect = (Last created special effect)
- Wait until (((Last created unit) is dead) Equal to True), checking every 1.00 seconds
- Special Effect - Destroy LastEffect
- Events
But dont I have to do a custom script to remove LastEffect varible?