Get and put itens

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

Moderators: Lapo, Bax

User avatar
frcol
Posts: 99
Joined: 22 Aug 2010, 09:26
Location: Brazil
Contact:

Get and put itens

Postby frcol » 05 Nov 2012, 22:15

Hi,
I need to get objets from OpenSpace (ambient map) and put it into my Bag (flash movieClip), and than get it from my bag and put it into the ambient.
The second one we have an example in the Demos.
But the first one I don´t have any idea. Any help in how to do that using OS2 and SFS1.9?

thanks.
Fabio Colombini
Brazil
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Get and put itens

Postby Bax » 06 Nov 2012, 09:24

I'll try to make an example, so you can confirm is this is the behavior you want to achieve.
The user is moving around on a map and, for example, he sees a coin on the floor. In your scenario the user should be able to click the coin to collect it, without entering the Edit Mode. Is that right?
Paolo Bax
The SmartFoxServer Team
User avatar
frcol
Posts: 99
Joined: 22 Aug 2010, 09:26
Location: Brazil
Contact:

Re: Get and put itens

Postby frcol » 06 Nov 2012, 17:40

Hi Bax!!
Yes, it´s something like that.

Is there a way to show a objetct just for a specifict user? For example, I wanna put quests into the world, but the objects from the quest must be showed just for the users that accept to participate the quest. And if he gets the objects, it disappears just for him.
Fabio Colombini
Brazil
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Get and put itens

Postby Bax » 07 Nov 2012, 09:28

I think you need a custom system which "setups" the map after it is loaded. Knowing where the items are located on a map (tile coordinates) and the user who is participating to the quest, you could have a special skin (backed by a custom class) on which you can call methods to show/hide the items. Adding the click listeners to those skins you could then make them disappear when the player collects the item.
Paolo Bax
The SmartFoxServer Team
radiateur
Posts: 62
Joined: 15 Aug 2011, 08:14

Re: Get and put itens

Postby radiateur » 17 Nov 2012, 10:58

That's what i did myself :a skin for a special item, on click it sends the skin name and if it match with a list i insert it to objects array.

Exactly the same thing is possible for pnjs and dialogues, because you send send 2 informations with a skin click ( i mean type item, name of item, for example : type:"pnj",name:"tom"). It's really easy to manage such skins items.

Return to “OpenSpace v2 discussions and help”

Who is online

Users browsing this forum: No registered users and 7 guests