Helllo,
I already know how to catch a mouse-event to a skin, and then fire a function to manipulate this skin : mySkin.gotoAndPlay("action");
It's easy because the Mouse-event send the Skin references, like this i can access position of the skin on the screen and else.
But what i don't know is the way to manipulate a tile's skin after the map is loaded and builded (to play automatic dialogues on pnjs) and get all its references (position x/y in for example) WITHOUT a mouse event or a player interaction on it.
So what would be the way to achieve this ?
Acces tile's skin references after map is generated.
Re: Acces tile's skin references after map is generated.
Give the tile containing a relevant skin an instance name in the Editor, then use the IOpenSpaceAPI.getSkinByName method.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Re: Acces tile's skin references after map is generated.
Thank you Bax
Re: Acces tile's skin references after map is generated.
Hello,
I did like you said and it works very nice (thank you), but i have an extension of my question :
How could i access tiles located INSIDE a supertile ? By using a named supertile like this : "supertile.skin1" "supertile.skin2" ?
I did like you said and it works very nice (thank you), but i have an extension of my question :
How could i access tiles located INSIDE a supertile ? By using a named supertile like this : "supertile.skin1" "supertile.skin2" ?
Re: Acces tile's skin references after map is generated.
A supertile is nothing more than a group of tiles.
Using the IOpenSpaceAPI.getGroup() method you can retrieve all the tiles of the supertile. Now you have to look for the exact tile you need and proceed like explained before.
Using the IOpenSpaceAPI.getGroup() method you can retrieve all the tiles of the supertile. Now you have to look for the exact tile you need and proceed like explained before.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Re: Acces tile's skin references after map is generated.
Great, thank you bax ^^
PS : I'm so happy i almost finished the development x)
PS : I'm so happy i almost finished the development x)
Re: Acces tile's skin references after map is generated.
Great! We will be happy to see the final result of your work.
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 50 guests