Page 1 of 1

Avatr custom Action sent by server extension

Posted: 27 Apr 2010, 09:11
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 ?

Posted: 27 Apr 2010, 16:29
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.