• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - Code how to [tile_set_depth] in GMS:2?

P

PandaPenguin

Guest
as the title says.... the function tile_set_depth got removed from GMS:2 so I'm having a hard time now getting my top-down RPG game to work with walls made from auto-tiles and objects/players "behind" these walls

the main reason I moved to GMS:2 was auto-tiles so how is it possible in GMS:2 to set different depths for individual tile cells other than a generall depth for the whole tileset layer?
 
A

anomalous

Guest
I don't think you can, its all on "layers" now, which is fast, and limiting.

obligatory design call: Is "behind the walls" really necessary or is it just a frill? You expect a lot of story and action back there? Can you achieve depth/immersion in some other easier way?

I never thought about it in GMS2, but I suspect you'll need to hand code all that. My first guess would be that you'd want to set up layers like this:
ground
wall
*hidewall
decal
roof

*hidewall would be normally empty.
When you walk behind a wall, you could add the corresponding wall tiles from the wall layer, to the hidewall layer, and then remove them from the wall layer.
Your hidewall layer could be at alpha 0.2 or something (I forget how alpha for tiles is set in GMS2 but it crashes so I cant verify). When outside the radius, any walls on hidewall are put back to wall, and removed from hidewall. tile operations are so fast this should be trivial.
 
Top