Hi! Welcome to the forum for Platinum Arts Sandbox Free 3D Game Maker. I currently have the forums locked as I am attempting to properly update them.

In the meantime please join the new Discord Server!

If you have any questions please e-mail me through the Platinum Arts website.

Player position and other questions

Having issues not related to a specific Sandbox game mode? Get help here!
Please also read the rules for support when posting support requests.
Failure to comply with the forum rules may result in your topic being locked without resolution.
Locked
boi
Member
Member
Posts: 1
Joined: June 8th, 2011, 11:11 am

Player position and other questions

Post by boi »

I'm a teacher and currently looking at PAS for next term lesseons.
Last week a couple of kids and myself made our fist steps in PAS and had a lot of fun with coop-editing a map.

Our next step would be to create some player interaction in-game.
We decided that we will go for some very simple hide-and-seek action.

We made a programm-overview, it looks like this:

1. One Player triggers an event (e.g.: moves to a start location).
He/she will be the "catcher".

2. After 30sec. (or so) he tries to find and catch all the other players.

3. When all player are found the game restarts.

After a good look at the PAS-wiki and the sauerbraten/cube2-pages I am still unable to answer the following Questions:

1. How can we store player-data? Variables like "catcher=0" for each player are necessary to code because e.g. only the catcher should be able to "catch".

2. How to implement the catching?
We thought about comparing the position of the players (e.g. posPlayer=x,y,z; if posCatcher=posPlayer then playerStatus...).
Is there a function for "getPosition"? Or an other way to detect collision between players?

I am looking forward for any suggestions, please excuse my bad engish.

PS: Linux, PAS V2.6.1
User avatar
Runescapedj
Member
Member
Posts: 1706
Joined: January 9th, 2010, 9:06 am
Name: Michiel
IRC Username: Sandboxdj
Location: Deventer, the Netherlands

Re: Player position and other questions

Post by Runescapedj »

I'm not good at coding, so I don't know the answer, but I'll just reply to get it back at top, so more people'll see it, because I think this has to be possible.

Please reply!
Locked