- Joined
- Feb 18, 2007
- Messages
- 216
I have an ability known as "Explosion Dart" in my map. Based on shadow strike, it fires a dart on enemy unit and after 3 seconds if the target unit is still alive, it will explode violently damaging units around it. The time is shown with floating text following enemy unit.
The problem is that the moment the dart hits the target and the floating text appears, insane amounts of lag will occur, freezing the game permanently (though not sure if it's permanent because I waited only few minutes but nevertheless). This didn't happen before, but I've changed the time from 5 to 3 seconds, so I might have done something fatal to the code dunno
Anyways, here are the triggers, tell me if you can find some sort of error from that:
The problem is that the moment the dart hits the target and the floating text appears, insane amounts of lag will occur, freezing the game permanently (though not sure if it's permanent because I waited only few minutes but nevertheless). This didn't happen before, but I've changed the time from 5 to 3 seconds, so I might have done something fatal to the code dunno
Anyways, here are the triggers, tell me if you can find some sort of error from that:
-
Explosion Dart
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Explosion Dart
-
Actions
- Set explosiondart_target = (Target unit of ability being cast)
- Wait ((Distance between (Position of marine) and (Position of explosiondart_target)) / 2000.00) seconds
- Floating Text - Create floating text that reads 3 above explosiondart_target with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
- Set explosiondart_text = (Last created floating text)
- Trigger - Turn on Explosion Dart Movement <gen>
- Wait 1.00 seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (explosiondart_target is alive) Equal to True
-
Then - Actions
- Floating Text - Change text of explosiondart_text to 2 using font size 10.00
-
Else - Actions
- Trigger - Turn off Explosion Dart Movement <gen>
- Floating Text - Destroy explosiondart_text
-
If - Conditions
- Wait 1.00 seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (explosiondart_target is alive) Equal to True
-
Then - Actions
- Floating Text - Change text of explosiondart_text to 1 using font size 10.00
-
Else - Actions
- Trigger - Turn off Explosion Dart Movement <gen>
- Floating Text - Destroy explosiondart_text
-
If - Conditions
- Wait 1.00 seconds
- Floating Text - Destroy explosiondart_text
- Trigger - Turn off Explosion Dart Movement <gen>
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (explosiondart_target is alive) Equal to True
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Life of explosiondart_target) Less than or equal to 500.00
-
Then - Actions
- Unit - Explode explosiondart_target
- Unit - Create 1 Explosion Dart Dummy for Player 1 (Red) at (Position of explosiondart_target) facing (Random angle) degrees
- Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius 350.00 at (Position of explosiondart_target), dealing 200.00 damage of attack type Chaos and damage type Universal
-
Else - Actions
- Unit - Cause (Triggering unit) to damage explosiondart_target, dealing 300.00 damage of attack type Chaos and damage type Universal
- Unit - Create 1 Explosion Dart Dummy for Player 1 (Red) at (Position of explosiondart_target) facing (Random angle) degrees
- Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius 350.00 at (Position of explosiondart_target), dealing 200.00 damage of attack type Chaos and damage type Universal
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
Events
-
Explosion Dart Movement
-
Events
- Time - Every 0.05 seconds of game time
- Conditions
-
Actions
- Floating Text - Change the position of explosiondart_text to explosiondart_target with Z offset 0.00
-
Events