For some chair maptiles I drew, I was thinking of having them be set up where someone (hero or NPC) can move onto them with the backrest of the chair showing behind them, but a character can also walk behind them and it would show overhead. Here's what they look like:
Unfortunately I can't think of a good way to do this. I tried making the chair a step-on NPC that doesn't do anything, and at first it seemed to work. But moving one Y coordinate up from the chair then caused it to be on top of the hero sprite even when moving back to the same Y coordinate.
Here's a quick video I made showing what I mean (kindly ignore the fact that it's a dog pirate guy and not a chair):
https://www.youtube.com/watch?v=iIH1Ciwpelc
So, I'm a bit stuck, not sure how to accomplish this. I was trying to think of using a step-on script next to those spots on either side of behind a chair to do... something that would make it behave properly, but I'm drawing a blank. Getting the X+Y coordinates adjacent to that spot and placing an overhead tile there, something along those lines maybe? Any insights would be helpful.
Map layer predicament!
Moderators: marionline, SDHawk
- Feenicks
- Metal Slime
- Posts: 697
- Joined: Tue Aug 10, 2010 9:23 pm
- Location: ON THE AIR IN THE AIR
- Contact:
When I did something of that nature a good while back, I had it so that walking on certain flags turned on and off certain layers. There's probably a better way to do it than how I did, though [3 layers?]
I see how that works, unfortunately it also causes a notable flicker when moving onto a tile that the character should be shown behind. I guess it would be possible to preempt that by having the trigger occur beside the tile instead of when the hero moves right on top of it, but that would be kind of a pain to sort out.
At this point, I think I might just make chairs solid objects and only have them occupiable during certain cutscenes, where things can be easily managed and don't have to take the player's and wandering NPCs' sprites into account.
At this point, I think I might just make chairs solid objects and only have them occupiable during certain cutscenes, where things can be easily managed and don't have to take the player's and wandering NPCs' sprites into account.
- Bob the Hamster
- Lord of the Slimes
- Posts: 7660
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact:
Yes, it's only things that are at the same Y coordinate as each other than have uncertain ordering.
Unfortunately this sort of thing can't be done with map layers, and the solution is to use slices (or NPCs since they're drawn with slices), so I think the ability to place slices on the map ought to be built into the map editor.
Unfortunately this sort of thing can't be done with map layers, and the solution is to use slices (or NPCs since they're drawn with slices), so I think the ability to place slices on the map ought to be built into the map editor.