I have been trying to set the _os_skin user variable as a JSON object decoded to a string from my custom openSpace extension but I've had having no luck getting it to work, is there an example anywhere of what the decoded JSON string should look like I haven't been able to locate anything online.
Thanks for any help!
setting _os_skin from smartfoxserver for an NPC
Re: setting _os_skin from smartfoxserver for an NPC
With OpenSpace for SFS Pro that user variable is a simple JSON string built using this method:
where skin is a plain object, for example:
Code: Select all
JSON.encode(skin)
where skin is a plain object, for example:
Code: Select all
var skin:Object = {}
skin.sex = isMale ? "m" : "f"
skin.hair = "hair1"
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Re: setting _os_skin from smartfoxserver for an NPC
Thanks for the reply Bax, I realized that I had been looking at the wrong documentation when trying to pass the skin in as JSON ( the SFS Pro documentation instead of the SFS 2X documentaiton ), I changed the _os_skin from a JSON string to a SFSObject in my server code and it worked!
Return to “OpenSpace v2 discussions and help”
Who is online
Users browsing this forum: No registered users and 16 guests