Hey,
I have a openspace map as avatar home and gave option for users to decorate it using the items i provide(using inventry).
Im creating different dynamic rooms and assigning the room variables as the map name(_os_mapId, myHome#m0_Map) for each user.
But the problem is that if a user decorates his home(edits the map) the changes are affected to all the avatars home since map is same and only room is different.
I dnt want it like that. I want the changes to take place in their home only.
Plz help me sort this out...
Thank you
Need help in editing the map
Re: Need help in editing the map
You have to make sure that each user modifies a separate version of the map.
Read the sendAvatarToMap method description of the OpenSpace serve-side API: http://openspace-engine.com/static/serv ... index.html
If describes an high level approach to make users enter their own "home". Once the user home is created in the right way, then you can modify it without issues.
Read the sendAvatarToMap method description of the OpenSpace serve-side API: http://openspace-engine.com/static/serv ... index.html
If describes an high level approach to make users enter their own "home". Once the user home is created in the right way, then you can modify it without issues.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Re: Need help in editing the map
Thanks Bax,
It seems I need to write a java extension that duplicates the map.
I'm really very poor in java, so if you can lead me to some example or some sample code which I can alter and use,
that would be very helpful...
It seems I need to write a java extension that duplicates the map.
I'm really very poor in java, so if you can lead me to some example or some sample code which I can alter and use,
that would be very helpful...
Re: Need help in editing the map
Sorry, I don't have an example to provide.
Anyway in the OpenSpace documentation you will find instruction on creating the Extension: http://openspace-engine.com/support/manuals/extension2x
Anyway in the OpenSpace documentation you will find instruction on creating the Extension: http://openspace-engine.com/support/manuals/extension2x
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Re: Need help in editing the map
Thanks a lot Bax,
I got the exact java code of duplicating the map at the link. Saved lot of my work....
If any1 needs it here's the link - http://openspace-engine.com/static/othe ... sion2X.zip
I got the exact java code of duplicating the map at the link. Saved lot of my work....
If any1 needs it here's the link - http://openspace-engine.com/static/othe ... sion2X.zip
Re: Need help in editing the map
Ouch, it seems I don't even remember what our own examples contain! Sorry!
Glad you found the solution.
Glad you found the solution.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Re: Need help in editing the map
Oh nice! Thank you Madhav!
Re: Need help in editing the map
@ radiateur, happy that this post helped you...
Credit goes to sfs team....
Credit goes to sfs team....
Re: Need help in editing the map
Hello,
So I read about extensions, and i rewrite the extension with the example, everything in netbeans seems ok. But i'm not sure if i have to plug it as a room extension or not. Somebody could explain me this?
So I read about extensions, and i rewrite the extension with the example, everything in netbeans seems ok. But i'm not sure if i have to plug it as a room extension or not. Somebody could explain me this?
Re: Need help in editing the map
Hai radiateur,
No you dont need to add it as a room extension.
Just add it as zone extension (and extend openspace extension)
No you dont need to add it as a room extension.
Just add it as zone extension (and extend openspace extension)
Re: Need help in editing the map
Thank you Madhav,
So it just work as as3 not compiled ? I put the jar next to Openspace Extension, as i long as i extend the Openspace class like this in the extension :
it works ? (excuse me it looks so simple that i'm not sure i undestand well)
So it just work as as3 not compiled ? I put the jar next to Openspace Extension, as i long as i extend the Openspace class like this in the extension :
Code: Select all
public class OsCustomExtension extends OpenSpaceExtension implements IOpenSpaceEventsListener
it works ? (excuse me it looks so simple that i'm not sure i undestand well)
Re: Need help in editing the map
Hai,
Worked for me....
In client side (as3) send a extension request for duplication of map... And the extension will duplicate the map, creates a room (with assigned room variables) and sends avatar to the map......
Worked for me....
In client side (as3) send a extension request for duplication of map... And the extension will duplicate the map, creates a room (with assigned room variables) and sends avatar to the map......
Re: Need help in editing the map
wow thanks, it's great ^^, it's so simple !
I can add any kind of extension like this, great !
I can add any kind of extension like this, great !
Re: Need help in editing the map
Hi,
Need help in canceling the changes made in openspace map during runtime editing!!
Here's the scenario-
Avatar is in a openspace map(whos room is never removed) and sends extension request to login to home(a openspace map). The extension creates a duplicate map and a dynamic room and sends avatar to map using cmd sendAvatarToMap. Now the avatar decorates its home(by dragging inventory items to map) and then chooses to cancel the changes by clicking cancel button [ leaveEditMode(false)]. But then the instead of reloading the current dynamic room, the room avatar was in before joining this map is getting loaded????
plz help....
Need help in canceling the changes made in openspace map during runtime editing!!
Here's the scenario-
Avatar is in a openspace map(whos room is never removed) and sends extension request to login to home(a openspace map). The extension creates a duplicate map and a dynamic room and sends avatar to map using cmd sendAvatarToMap. Now the avatar decorates its home(by dragging inventory items to map) and then chooses to cancel the changes by clicking cancel button [ leaveEditMode(false)]. But then the instead of reloading the current dynamic room, the room avatar was in before joining this map is getting loaded????
plz help....
Re: Need help in editing the map
Are you sure you are sending the avatar to the duplicated map?
Because when you cancel the editing, the map you were editing is reloaded, not a different one. Of course it is the map linked to the current Room joined by the user.
Because when you cancel the editing, the map you were editing is reloaded, not a different one. Of course it is the map linked to the current Room joined by the user.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Return to “OpenSpace v2 discussions and help”
Who is online
Users browsing this forum: No registered users and 31 guests