I want to design a compactor with walls on opposite sides moving toward each other, and kill the player if he cannot get out in time.
Any suggestion for how the coding can be done?
Any suggestion for how the coding can be done?
On every event step, use function "Get Location Info" (tab 3), then assign this event Map X to variable, let's say "left wall X". Same with 2nd wall, but assign to another variable. Then compare them (substraction can do this), and if difference is 2 or less, then if event touches player -> cause death.
Original thread: https://forums.rpgmakerweb.com/threads/star-wars-style-trash-compactor.129966/