I've been playing around, trying to get this working, but have been running into difficulty.
I'm trying to detect when an actor is being crushed (i.e being touched by tiles at the top and bottom of the actor simultaneously.)
However, my efforts have resulted in the actor either not being killed at all, or killed when just the top hits a tile. Any help gratefully appreciated.
I've attached screenshots of the code. One of the full code, and one just showing any code that's relevant.
EDIT: I've been trying to solve it by checking if the player is airborne or not. My reasoning was that if the player isn't airborne, and the top of the player hits a tile, the player must be getting crushed. But this approach hasn't worked.