Store last known coords

Post here your questions about the OpenSpace 2.x or notify bugs and suggestions.

Moderators: Lapo, Bax

dannyrg
Posts: 19
Joined: 19 Oct 2010, 19:08

Store last known coords

Postby dannyrg » 28 Oct 2010, 17:44

Hi,

What would be the best approach to storing last know coords (and room name) before client disconnects, so he appears at the same place when loging back in?

I've already implemented the re-login part, but I find it not so easy to implement saving the "last known coords".
(The only way I've figured so far, was to implement a AvatarStop trigger to each and every walkable tile on the map and send a XTMessage with the info to log in the database. but this seems like an insane task, to manually put such a trigger on thousands of tiles. which raises another question, about automation of tile trigger placement (of the same trigger, of course) )

Is there any way to access the server-side pathfinding (let's say, just after it sent the requested path to the client) and there to implement the database storing of the info?

Thanks
TiagoR
Posts: 83
Joined: 15 Mar 2010, 11:42
Location: Portugal
Contact:

Postby TiagoR » 29 Oct 2010, 07:53

Hi,
from what i see, on avatar movement you receive the SFSEvent.onExtensionResponse _os_move from server, on event fired you can get the avatar userVariables _os_px, os_py and os_pz and store them as you like.
TR

Return to “OpenSpace v2 discussions and help”

Who is online

Users browsing this forum: No registered users and 4 guests