Unable to reference avatars

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

Moderators: Lapo, Bax

Post Reply
warhell
Posts: 199
Joined: 18 Aug 2007, 16:49
Location: Silicon Valley, CA
Contact:

Unable to reference avatars

Post by warhell »

After exiting from edit mode, I immediately try to access an avatar, but all I get is a null reference. Below is the code and the error I receive...

Code: Select all

var avatar:com.smartfoxserver.openspace.engine.model.avatar.Avatar = openspace.getAvatarById(evt.npc_id);

Code: Select all

[OpenSpace|INFO]  Avatar '161' created in (5,3,0)

TypeError: Error #1009: Cannot access a property or method of a null object reference
SmartFoxServer and OpenSpace developer
www.edgarmiranda.net
laxersaz
Posts: 50
Joined: 30 Nov 2009, 16:19
Contact:

Post by laxersaz »

You have to wait until the avatars are rendered again after edit mode.
Post Reply