Tile API and Layer Order/ID

tgbtom

  • Posts: 127
Kind of a straightforward question, is there any way to specify which layer to create a tile on, based on the layers ID? I have a lot of issues with layers when creating tiles on runtime. Collisions seem to work okay for the most part, but when I am trying to create tiles on layer 2 (top layer) they just wont show up. However tiles will spawn correctly on layer 0 and 1! I even tried creating a fourth layer (Layer 3) and using that one, however they also won't spawn on that layer.

Before you jump to a conclusion, I have not deleted any regions from the scene since its creation, so the problem should not be with that glitch...

Any help is highly appreciated

-Tgb
________________,.-*'Renewal'*-.,________________
http://community.stencyl.com/index.php/topic,10615.0.html

http://renewalthegame.blogspot.ca/
------------------------'*-.,Renewal,.-*'------------------------

tgbtom

  • Posts: 127
I wasted about 30 minutes testing to find out the true order of the layers and the corresponding numbers. So I have it written down for this scene's future use. I still want to know if there is a way to actually look at this information without needing to waste time testing. The layers on Stencyl seem to be pretty glitchy still, I hope they work better when 3.0 comes out :) So please let me know if you have a lot of knowledge on layers within Stencyl ;P

-Tgb

P.S The autocorrect keeps on changing Stencyl to stencil! xP
________________,.-*'Renewal'*-.,________________
http://community.stencyl.com/index.php/topic,10615.0.html

http://renewalthegame.blogspot.ca/
------------------------'*-.,Renewal,.-*'------------------------

rob1221

  • *
  • Posts: 9473
I think the layer implementation in 3.0 fixes this problem.

Rimrook

  • Posts: 251
Hi there, I found a lot of trouble with the layers and collisions as well. After a little bit of work, found that it was best for my game to make a custom collision layer on top of everything. It is a layer that has only collision tiles on it. These tiles are simple non-graphical tiles that I used to define what is solid and what is not. If I wanted the player to be able to pass through a wall to a secret area, I easily could allow that. It also allows me to pile up the graphics without a care knowing that the collision will always be correct. All of the graphic tiles are non-solid.  In my scene behaviours, I hide the layer. Here's a pic to explain it.

If this is right for your game, go for it.



tgbtom

  • Posts: 127
I appreciate that and It sounds like it would be really helpful... However my game is placed in a somewhat 2.5 dimensional aspect. and so the issue has nothing to do with collisions so much as it does setting tiles on the right layer for visuals. For example I don't want to walk up to a tree stump from below and have my head disappear behind the stump.

-Tgb
________________,.-*'Renewal'*-.,________________
http://community.stencyl.com/index.php/topic,10615.0.html

http://renewalthegame.blogspot.ca/
------------------------'*-.,Renewal,.-*'------------------------