Page 1 of 1

setMyAvatarSkin Problem

Posted: 05 May 2010, 11:45
by ashrey_user
Hello sir,

When i trigger the setMyAvatarSkin function then when new user login.
The new user did not see that avatar that use the setMyAvatarSkin function but the user that login before the setMyAvatarSkin see the broadcast

note: in setMyAvatarSkin i am calling another class of avatar to replace the old avatar.

How i can fix this?

Thank you and Regards

Rey V.

Posted: 05 May 2010, 13:03
by Bax
Sorry, I don't understand. When you call the setMyAvatarSkin method, the object you pass is saved in a SmartFoxServer User Variable. The the Avatar.skin property is set too.
What does it means that "in setMyAvatarSkin i am calling another class of avatar to replace the old avatar"?

Posted: 06 May 2010, 00:53
by ashrey_user
Yes. The skin is also set for another character. For example. Woman avatar
become man avatar.

f_european_stand >> m_european_stand

The existing user in the room see the broadcast changes also the broadcast when the avatar moves or walk. But when the new comer or new user log in,
the avatar that use the setMyAvatarSkin(obj) was not see by new comer only the existing user see it.

Thank you

Rey

Posted: 06 May 2010, 08:12
by Bax
When a user enters a map, all the existing avatars are created. When creating an avatar, the Avatar.skin property is set. You should check if the expected value is received, and act accordingly.