So, I've been working on a system to have players able to push blocks that they can then walk on. At first, I was just using a placeholder graphic, which worked fine even though it looked all wrong. Now, though, I'm using a crate that's actually the correct size to line up with my tile-high second level of floor. There's only one problem.
Yeah, that's not quite right.
The logic for letting the player walk onto the crate is held in a player-touch response to the event, and uses the region that the player comes from to determine whether to "push" or "walk." Unfortunately, the player touch trigger is in the bottom tile of the event. For the push action, that's the behavior I want anyway, but we definitely don't want the player to walk on the side of the box!
So I believe I have to either find some way to detect whether the player is trying to interact with the tile above (which I have no idea how to do), or put each half of the box in a separate event and try to cleverly link them together. The second approach would be a complicated process, and it would make it a lot harder to reuse the boxes since it couples two events. So, is there a way I can go the first route? Or do you know of another solution?
Yeah, that's not quite right.
The logic for letting the player walk onto the crate is held in a player-touch response to the event, and uses the region that the player comes from to determine whether to "push" or "walk." Unfortunately, the player touch trigger is in the bottom tile of the event. For the push action, that's the behavior I want anyway, but we definitely don't want the player to walk on the side of the box!
So I believe I have to either find some way to detect whether the player is trying to interact with the tile above (which I have no idea how to do), or put each half of the box in a separate event and try to cleverly link them together. The second approach would be a complicated process, and it would make it a lot harder to reuse the boxes since it couples two events. So, is there a way I can go the first route? Or do you know of another solution?