Avatr custom Action sent by server extension

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

Moderators: Lapo, Bax

ffourcad
Posts: 130
Joined: 25 Feb 2010, 10:26

Avatr custom Action sent by server extension

Postby ffourcad » 27 Apr 2010, 09:11

hello (again),

I'd like to use the onCustomAction listener on my NPC avatars, but I'd like the action to be sent by my server-side extension. In the client API doc, it is said that the event is trigered with the setMyAvatarAction, which a client method.
How can I do this on the server-side ?
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 27 Apr 2010, 16:29

You can simply send a custom extension response to your application, containing the user id and the parameters to be passed to the onCustomAction method. In the response handler, retrieve the avatar corresponding to the user id from the OpenSpace instance, and call the onCustomAction method directly.
Paolo Bax
The SmartFoxServer Team

Return to “OpenSpace v2 discussions and help”

Who is online

Users browsing this forum: No registered users and 40 guests