| 09-20-2006, 08:13 PM | #2 |
There is no point in using a local variable instead of a global in GUI if there are no waits. Distance between (Position of (Casting unit)) and (Target point of ability being cast) Leaks. temppoint leaks. Never destroyed. Suggest you read some tutorials, as you don't appear to understand what you are doing, which is vital. |
| 09-20-2006, 08:16 PM | #3 |
Learn to use the [trigger] tags. |
| 09-20-2006, 08:18 PM | #4 |
I tried destroying the variables afterwards, but when i did that it could only run the trigger once. i have read some tutorials on the topic and never came across anything on the "Distance Between" function. As for the local your absolutely right, i originally planned on having waits but in the end decided against it. Thanks captain, youve been a big help lately. :) |
| 09-20-2006, 08:23 PM | #5 | |
Region centered at ((Position of (Casting unit)) offset by (Real((Integer A))) towards (Facing of (Casting unit)) degrees) Also leaks twice. Quote:
No, you don't destroy the variables, but the objects that the variables point to. |
| 09-20-2006, 08:28 PM | #6 |
I assume it leaks at "Position of (Casting unit))" and "offset by (real((integer A)))" |
| 09-20-2006, 08:29 PM | #7 |
Creates two new locations, yes. If you can, I'd suggest learning JASS, so you can throw away locations pretty much for good and use co-ordinates. |
| 09-20-2006, 08:59 PM | #8 |
Ofc, griff is right again, using X/Y/Z is much better than handling locations, yes locations have some advantages, but coords are not handles, they dont leak. Its easier to use them, and is just better! Rawr! Position of UNIT always leaks, set it to a location, then use: Trigger: Custim Script: call RemoveLocation(SomeLocation)Remember, if you set a variable to a location, then you dont destroy and set it to another, then destroy, dont hope it will remove them both, you need to destroy it each time you'v finished using it before you should set it again. |
