- Joined
- Jul 5, 2009
- Messages
- 41
Hi, I'm having a problem with memory leaks. I'm pretty experienced with GUI triggering, and I've worked on minimizing memory leaks for quite some time now (and somewhat succesful). Theoretically, these triggers should not create any memory leaks (according to my knowledge). However I see a drastic drop in framerate simply by this spell being cast once.
I've tried to replicate a kind of "charge/rush towards a point"-spell. I call upon you guys' expertise to identify the problem. Any further secrets in erasing memory leaks would be appreciated, however this is not my main problem, thanks in advance.
I've tried to replicate a kind of "charge/rush towards a point"-spell. I call upon you guys' expertise to identify the problem. Any further secrets in erasing memory leaks would be appreciated, however this is not my main problem, thanks in advance.
-
Charge
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Slide
-
Actions
- Unit Group - Add (Triggering unit) to ChargeUnitGroup
- Unit - Turn collision for (Triggering unit) Off
- Set ChargePoint[1] = (Target point of ability being cast)
- Trigger - Turn on Charge loop <gen>
-
Events
-
Charge loop
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in ChargeUnitGroup and do (Actions)
-
Loop - Actions
- Set ChargePoint[2] = (Position of (Picked unit))
- Set ChargePoint[3] = (ChargePoint[2] offset by 13.00 towards (Angle from ChargePoint[2] to ChargePoint[1]) degrees)
- Unit - Move (Picked unit) instantly to ChargePoint[3]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Distance between ChargePoint[2] and ChargePoint[1]) Less than or equal to 13.00
-
Then - Actions
- Unit Group - Remove (Picked unit) from ChargeUnitGroup
- Unit - Turn collision for (Picked unit) On
- Custom script: call RemoveLocation(udg_ChargePoint[1])
- Custom script: call RemoveLocation(udg_ChargePoint[2])
- Custom script: call RemoveLocation(udg_ChargePoint[3])
- Trigger - Turn off (This trigger)
-
Else - Actions
- Custom script: call RemoveLocation(udg_ChargePoint[2])
- Custom script: call RemoveLocation(udg_ChargePoint[3])
-
If - Conditions
-
Loop - Actions
-
Unit Group - Pick every unit in ChargeUnitGroup and do (Actions)
-
Events