Reading a actors X any Y posision

Game Editor comments and discussion.

Reading a actors X any Y posision

Postby HillBilly » Sat Dec 23, 2006 11:04 am

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.
HillBilly
 
Posts: 68
Joined: Thu Jun 08, 2006 4:31 am
Location: OHIO, USA
Score: 4 Give a positive score

Postby marathon332 » Sat Dec 23, 2006 11:48 am

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
User avatar
marathon332
 
Posts: 57
Joined: Tue Sep 06, 2005 4:00 am
Score: 2 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest