| 08-21-2005, 12:14 AM | #1 |
Do leaks ever occur in the conditions of a trigger? For example: Events A unit starts the effect of an ability Conditions ((Region centered at (Position of (Triggering unit)) with size (300, 300)) contains (Target point of ability being cast)) Equal to True Aren't those underlined sections leaks? |
| 08-21-2005, 04:38 AM | #2 |
Yes, that will leak, although i think only Position of unit will leak, as i dont think that target point of ability leaks. |
| 08-21-2005, 09:25 AM | #3 |
According to my knowledge, both locations and the region will leak. They are all handle objects that will be created by those functions, and never removed. |
| 08-21-2005, 07:29 PM | #4 |
How would you remove those leaks? |
| 08-21-2005, 10:36 PM | #5 |
Move the condition into the actions of the trigger by using an if-then-else action. Then dispose of the leaks using the standard procedure. |
| 08-21-2005, 11:19 PM | #6 |
Couldn't you just check the distance between position of triggering unit and target point of ability being cast instead of creating a rect everytime (Still you have to remove the points) |
| 08-22-2005, 04:55 PM | #7 | |
Quote:
If that's the only way to remove leaks in conditions, so be it. But won't the game lag more if it has to for conditions in the actions, instead of the conditions? Example: Trigger 1: Events: A unit starts the effect of an ability Conditions: Ability being cast equal to Storm Bolt Actions: Kill target unit of ability being cast ---------- Trigger 2: Events: A unit starts the effect of an ability Conditions: none Actions: If ability being cast equal to Storm Bolt then kill target unit of ability being cast else Isn't trigger 1 more processor-intensive than trigger 2? Or is there no difference? |
