Page 1 of 1
how do Avatar act with anything that not avatar?
Posted: 16 Feb 2009, 07:05
by ddk2
i put some building that is a tails. and i want my avatar act with it,
how can i do it?

Posted: 18 Feb 2009, 07:21
by Bax
"building that is a tails"... can you better explain?
Anyway, the Ranch example shows how to implement interaction with a building (when the avatar is in front of the doors, they become clickable so you can enter the house).
Posted: 19 Feb 2009, 14:54
by ddk2
ok, i find how to ctrl my building. just use getMapObject, to get building content and do my custom func.
then, i have another question, how can i set avator moving speed?

Posted: 19 Feb 2009, 15:42
by Bax
then, i have another question, how can i set avator moving speed?
The avatar speed can be set in the OpenSpace xml configuration file. Please check
this document ("Avatars" section, "animTime" parameter).
Posted: 19 Feb 2009, 23:49
by ddk2
thank you, bax
Posted: 25 Feb 2009, 15:38
by LEAn
Is there any ability to get all such map objects and to get tile on which object resides?
Or, may be, just get all tiles and then inspect skin of each one?
Posted: 25 Feb 2009, 21:40
by Bax
Why do you need to get the tile to which a skin belongs?
Posted: 26 Feb 2009, 06:46
by LEAn
I need to make such thing, as when user clicks on object with which it can interact, than avatar will move to the nearest tile and than object will be activated. So I need to get all such objects and be able to direct user's avatar to assigned tile. Getting tile on whcih object located is not the high priority. I can associate tile in another way. But I want to get list of map objects.
Posted: 26 Feb 2009, 07:06
by Bax
The problem I see is that the you have no way to know on which tile you have to send the avatar when a certain object is clicked, unless you parse the map on your side.
I would suggest that you save additional data for the map, like object name -> destination coordinates. When the map is rendered add your click listeners to the map objects and when the event is fired retrieve the associated coordinates and call the moveMyAvatar method.
Posted: 26 Feb 2009, 07:36
by LEAn
I can specify tiles to go in params, I think.
But is it any chance to get all objects? Or I need to manage list of this objects separatly?
Posted: 26 Feb 2009, 07:41
by Bax
You have to manage your list separately.