How do I find the player's current position?
by Mark Brown · in Game Design and Creative Issues · 04/15/2006 (10:59 am) · 3 replies
I understand where to spawn my player and can spawn him whereever I like. But once he starts to move, I know longer know where he is. How can I, within a *.cs script routine, get the player's current position? What type of variable do I capture this information in and how do I read it?
- Mark
- Mark
About the author
#2
%pos = localclientconnection.player.getPosition();
is one way you might be able to get that info.
04/15/2006 (2:59 pm)
Well well the easiest way i found is to assign a variable to the player object when it's spawned. but if global variables wont cut it....%pos = localclientconnection.player.getPosition();
is one way you might be able to get that info.
#3
Why would you do that? It's already available via shapeBase.
Which only will work if the player is the host.
04/15/2006 (3:51 pm)
Ramen,Quote:Well well the easiest way i found is to assign a variable to the player object when it's spawned. but if global variables wont cut it....
Why would you do that? It's already available via shapeBase.
Quote:
%pos = localclientconnection.player.getPosition();
Which only will work if the player is the host.
Associate Orion Elenzil
Real Life Plus