HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Weird Problem with setting up points.

04-29-2010, 02:18 AM#1
Drain Pipe
I don't know if this is meant to be but for some reason setting up points using the wc3 editor seems to be doing something weird.

Say I define a point A (ie point of ability being cast). Then I define a Point B as B=A

Now I delete B. I try to track B. B is gone and rightly so. I try to track A. A is also gone. What's going on here?
04-29-2010, 03:55 AM#2
Viikuna-
Because poinst are like objects.

Think it with units.

set a = create unit

set b = a

kill b

is a still alive?


no it aint.


youd have to create another similiar unit for b or something:

set a = create unit

set b = create unit

kill b

is a still alive?

yep.


Its same thing with points.
Since you use points, you are probably a GUI user. ( Since you only need one point/location with Jass )

You can use thiskind of custom srcipt to copy your points:

Collapse JASS:
function CopyPoint takes location loc returns location
    return Location(GetLocationX(loc),GetLocationY(loc))
endfunction
04-29-2010, 04:01 AM#3
PurgeandFire111
You are removing the object, not the pointer itself. If you want to retain A's value, you'd use "set B = null".

EDIT: Hmm... beat to the post.
04-29-2010, 05:19 AM#4
Drain Pipe
thx for that. I do do a lil bit of jass but i've stopped and have gone back to .gui since it's more familiar. I dunno, i've never run into this problem before in the past...good to know.