This is my spell trigger and evertime i use it, the game slowy starts lagging from it can anyone tell me what is leaking or what is making it lagg my game
+rep for any help!!
+rep for any help!!
Trigger:
- IntManadic Dagger
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Manadic Dagger - Dagger Assassin
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- MUI_Integer Greater than or equal to 250
- Then - Actions
- Set MUI_Integer = 1
- Else - Actions
- Set MUI_Integer = (MUI_Integer + 1)
- If - Conditions
- Set Temp_Point = (Position of (Triggering unit))
- Unit - Create 1 DaggerArt for (Owner of (Triggering unit)) at Temp_Point facing (Facing of (Triggering unit)) degrees
- Unit - Set the custom value of (Last created unit) to MUI_Integer
- Custom script: call RemoveLocation (udg_Temp_Point)
- Set Angle[MUI_Integer] = (Angle from (Position of (Triggering unit)) to (Target point of ability being cast))
- Set N[MUI_Integer] = 0.00
- Set Distance[MUI_Integer] = (Distance between (Position of (Triggering unit)) and (Target point of ability being cast))
- Trigger - Turn on Manadic Dagger <gen>
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
Trigger:
- Manadic Dagger
- Events
- Time - Every 0.05 seconds of game time
- Conditions
- Actions
- Set Temp_UnitGroup = (Units of type DaggerArt)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Number of units in Temp_UnitGroup) Less than or equal to 0
- Then - Actions
- Trigger - Turn off (This trigger)
- Skip remaining actions
- Else - Actions
- If - Conditions
- Unit Group - Pick every unit in Temp_UnitGroup and do (Actions)
- Loop - Actions
- Set N[(Custom value of (Picked unit))] = (N[(Custom value of (Picked unit))] + 15.00)
- Set Temp_Point = (Position of (Picked unit))
- Set MoveToPoint = (Temp_Point offset by 15.00 towards Angle[(Custom value of (Picked unit))] degrees)
- Unit - Move (Picked unit) instantly to MoveToPoint
- Custom script: call RemoveLocation (udg_MoveToPoint)
- Custom script: call RemoveLocation (udg_Temp_Point)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- N[(Custom value of (Picked unit))] Greater than or equal to Distance[(Custom value of (Picked unit))]
- Then - Actions
- Set Temp_Point = (Position of (Picked unit))
- Unit - Create 1 LightingMovetoPoint for (Owner of (Picked unit)) at Temp_Point facing Default building facing degrees
- Unit - Set the custom value of (Last created unit) to 30
- Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
- Special Effect - Destroy (Last created special effect)
- Unit - Create 1 Dumdy for (Owner of (Picked unit)) at Temp_Point facing Default building facing degrees
- Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
- Unit - Add War Stomp - Ord Of Lighting to (Last created unit)
- Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
- Unit - Remove (Picked unit) from the game
- Custom script: call RemoveLocation (udg_Temp_Point)
- Trigger - Turn on MovingToManadic <gen>
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Number of units in Temp_UnitGroup) Less than or equal to 0
- Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
- If - Conditions
- Else - Actions
- If - Conditions
- Loop - Actions
- Custom script: call DestroyGroup (udg_Temp_UnitGroup)
- Events
Trigger:
- MovingToManadic
- Events
- Time - Every 0.05 seconds of game time
- Conditions
- Actions
- Set Temp_UnitGroup = (Units of type LightingMovetoPoint)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Number of units in Temp_UnitGroup) Less than or equal to 0
- Then - Actions
- Trigger - Turn off (This trigger)
- Skip remaining actions
- Else - Actions
- If - Conditions
- Unit Group - Pick every unit in Temp_UnitGroup and do (Actions)
- Loop - Actions
- Set Temp_Point = (Position of (Picked unit))
- Set Temp_UnitGroup2 = (Units within 600.00 of Temp_Point matching ((Owner of (Matching unit)) Equal to Player 12 (Brown)))
- Unit Group - Pick every unit in Temp_UnitGroup2 and do (Actions)
- Loop - Actions
- Set Temp_Point2 = (Position of (Picked unit))
- Set MoveToPoint = (Temp_Point2 offset by 10.00 towards (Angle from (Position of (Picked unit)) to Temp_Point) degrees)
- Unit - Move (Picked unit) instantly to MoveToPoint
- Custom script: call RemoveLocation (udg_Temp_Point2)
- Custom script: call RemoveLocation (udg_MoveToPoint)
- Loop - Actions
- Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) - 1)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Or - Any (Conditions) are true
- Conditions
- (Custom value of (Picked unit)) Equal to 20
- (Custom value of (Picked unit)) Equal to 10
- (Custom value of (Picked unit)) Equal to 0
- Conditions
- Or - Any (Conditions) are true
- Then - Actions
- Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
- Special Effect - Destroy (Last created special effect)
- Unit - Create 1 Dumdy for (Owner of (Picked unit)) at Temp_Point facing Default building facing degrees
- Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
- Unit - Add War Stomp - Ord Of Lighting to (Last created unit)
- Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Or - Any (Conditions) are true
- Conditions
- (Custom value of (Picked unit)) Equal to 0
- Conditions
- Or - Any (Conditions) are true
- Then - Actions
- Unit - Remove (Picked unit) from the game
- Else - Actions
- If - Conditions
- Else - Actions
- If - Conditions
- Custom script: call RemoveLocation (udg_Temp_Point)
- Loop - Actions
- Custom script: call DestroyGroup (udg_Temp_UnitGroup)
- Events