EDIT: Mystery solved. Leaks were not being auto-cleaned. Read the whole thread for details. Don't stop in the middle to talk shit to the people who actually put effort into helping, kthx.
I had some issues with triggers after I added code to clean up locations... So I posted asking for help. The responses were completely useless as people put no effort into solving my problem.
What I ended up figuring out was that under certain conditions, a location I had set in a variable would cease to exist. I had units which failed to spawn because they had no location to spawn to, because at some point the location object was being removed before I told it to.
I fixed my triggers by either using a different location that wasn't being destroyed before I told it, or for some triggers I had to create a new location from scratch... But anyway, I don't know the conditions needed to get this auto-cleanup thing. Anyone have any idea what's going on?
I will post the trigger I asked for help with before and point out what I changed:
Is it really cleaning up TempPoint, or is it somehow losing track of it and leaking it anyway?
I had some issues with triggers after I added code to clean up locations... So I posted asking for help. The responses were completely useless as people put no effort into solving my problem.
What I ended up figuring out was that under certain conditions, a location I had set in a variable would cease to exist. I had units which failed to spawn because they had no location to spawn to, because at some point the location object was being removed before I told it to.
I fixed my triggers by either using a different location that wasn't being destroyed before I told it, or for some triggers I had to create a new location from scratch... But anyway, I don't know the conditions needed to get this auto-cleanup thing. Anyone have any idea what's going on?
I will post the trigger I asked for help with before and point out what I changed:
-
Savage Leap Move
-
Events
- Unit - A unit Dies
-
Conditions
- (Unit-type of (Dying unit)) Equal to Savage Leap Timer
-
Actions
- Set TempPoint = (Position of Hero[(Player number of (Owner of (Dying unit)))])
- Set TempPoint2 = (TempPoint offset by 48.00 towards PusherAngle[(Player number of (Owner of (Dying unit)))] degrees)
- Unit - Move Hero[(Player number of (Owner of (Dying unit)))] instantly to TempPoint2
- Unit - Move SavageLeapUnit[(Player number of (Owner of (Dying unit)))] instantly to TempPoint2
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (SavageLeapUnit[(Player number of (Owner of (Dying unit)))] is alive) Equal to True
-
Then - Actions
- -------- The following action was not working. The unit would not spawn. I changed it to spawn at TempPoint2 rather than TempPoint and it worked after that. --------
- Unit - Create 1 Savage Leap Timer for (Owner of (Dying unit)) at TempPoint2 facing 0.00 degrees
- Unit - Add a 0.03 second Generic expiration timer to (Last created unit)
- Else - Actions
-
If - Conditions
- Custom script: call RemoveLocation(udg_TempPoint)
- Custom script: call RemoveLocation(udg_TempPoint2)
- Unit - Remove (Dying unit) from the game
-
Events
Is it really cleaning up TempPoint, or is it somehow losing track of it and leaking it anyway?
Last edited: