- Joined
- Jul 20, 2009
- Messages
- 295
Hello,
I'm trying to create a trigger so that every unit that casts a spell and as long as it is casting it, a special effect appears at their position up until they finish casting.
These are the triggers:
Problem:
The special effect only appears once and that's it, as if the trigger no longer works. The problem is with the Custom Script 'set bj_wantDestroyGroup' but I need it to remove leaks though Im not sure how to use it correctly.
Help me out please, thank you.
I'm trying to create a trigger so that every unit that casts a spell and as long as it is casting it, a special effect appears at their position up until they finish casting.
These are the triggers:
-
Start Casting
-
Events
- Unit - A unit Begins channeling an ability
-
Conditions
- ((Triggering unit) is A Hero) Equal to True
-
Actions
- Unit Group - Add (Triggering unit) to Casting_Group
- Trigger - Run Casting GFX Check <gen> (checking conditions)
-
Events
-
Finish Casting
-
Events
- Unit - A unit Finishes casting an ability
-
Conditions
- ((Triggering unit) is A Hero) Equal to True
-
Actions
- Unit Group - Remove (Triggering unit) from Casting_Group
- Trigger - Run Casting GFX Check <gen> (checking conditions)
-
Events
-
Casting GFX Check
- Events
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in Casting_Group) Greater than 0
-
Then - Actions
- Trigger - Turn on Casting GFX <gen>
-
Else - Actions
- Trigger - Turn off Casting GFX <gen>
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Casting GFX
-
Events
- Time - Every 0.50 seconds of game time
- Conditions
-
Actions
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in Casting_Group and do (Actions)
-
Loop - Actions
- Set TempLocation = (Position of (Picked unit))
- Special Effect - Create a special effect at TempLocation using war3mapImported\Mana Refresh.mdx
- Special Effect - Destroy (Last created special effect)
- Custom script: call RemoveLocation(udg_TempLocation)
-
Loop - Actions
-
Events
The special effect only appears once and that's it, as if the trigger no longer works. The problem is with the Custom Script 'set bj_wantDestroyGroup' but I need it to remove leaks though Im not sure how to use it correctly.
Help me out please, thank you.