Page 1 of 1

Reading a actors X any Y posision

PostPosted: Sat Dec 23, 2006 11:04 am
by HillBilly
I figure this is a something simple that I am messing up again. I need to set up a variable to read for a actors x and y position.

I figured this would do it but I just get the number 163 no matter where I move the player. (Also my actor is no place near 163 cord. So I do not know where it get that number from.)

I have this set up in a Draw Actor


PlayersX=Player.xscreen;
textNumber=PlayersX;

and I have PlayersX set up as a variable.

PostPosted: Sat Dec 23, 2006 11:48 am
by marathon332
Just use:

textNumber=Player.x;

Should work...

xscreen, yscreen coordinates are relative to the view. So if your view moves with the player it will always be the same coordinate relatively speaking.

x,y coordinates are relative to the game center, so they will change when the player moves regardless of the view.

Hope that helps...

--Steve

P.S. Check out my new game made with Game-editor
http://the-web-lab.com/moonbasedefender