| 11-24-2007, 04:29 AM | #1 |
Trigger: Fire
How do I remove the location at FireX and FireY? Rather, how do you remove locations created by the use of coordinates in general? Do you use JASS:call RemoveLocation(udg_Firex, udg_FireY)) Man...switching from regular Point variables to using coordinates is confusing. |
| 11-24-2007, 04:36 AM | #2 |
I think it would be: JASS:call RemoveLocation(Location(udg_FireX, udg_FireY)) |
| 11-24-2007, 04:45 AM | #3 |
So Location(Location()) converts into coordinates. I see now, thanks. |
| 11-24-2007, 04:46 AM | #4 |
Do coordinates even leak...? |
| 11-24-2007, 05:06 AM | #5 |
you are using coordinates there... no location is created, so using remove location is not needed here |
| 11-24-2007, 06:40 AM | #6 |
Actually, he is leaking a location: ...(Point(FireX, FireY))... The only way to fix leaks like that is to store the location in a variable. At that rate, you might as well not even use the custom scripts and set the location outright: Trigger: Actions![]() Set TempPoint = (Position of (Target Unit of Ability Being Cast))![]() ----- If you needed these set for some reason, you can do it still -----![]() set FireX = X of (TempPoint)![]() set FireY = Y of (TempPoint)![]() ----- - -----![]() Unit - Create 1 Sniper Bullet for (Owner of (Casting unit)) at TempPoint) facing ducks![]() Custom script: call RemoveLocation(udg_TempPoint) |
| 11-24-2007, 09:02 PM | #7 |
X and Y are good, but if you need to create the location anyway use the location. Best idea would be to use: JASS:call CreateUnit(GetOwningPlayer(GetTriggerUnit()), 'Sniper Bullet Id', GetUnitX(GetSpellTargetUnit()), GetUnitY(GetSpellTargetUnit()), udg_ducks) |
| 11-25-2007, 02:36 AM | #8 |
Oh dear, my bad, I've totally forget about GUI uses CreateUnitLoc instead of CreateUnit... |
