Avatr custom Action sent by server extension

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

Moderators: Lapo, Bax

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

Avatr custom Action sent by server extension

Post by ffourcad »

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: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

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
Post Reply