Allow events to be triggered when the player is On & Beside it.
Though it's a bit tricky to use, this allows developers to build traps that can be disarmed without having the player to trigger the traps first.
How to Use:
[1] Place the script below Material and above Main.
[2] Put <trap> tag in the event's name you wish to set up with 2 trigger.
[3] Set the event to trigger by "Player Touch" and Priority to "Below Characters"
[4] In the event's page, set up a conditional branch using this in the script box.
$game_map.events[@event_id].x == $game_player.x && $game_map.events[@event_id].y == $game_player.y[5] This will allow you to set up 2 trigger conditions.
When the player walks on to the trap: trigger damage
When the player is beside the trap and pushed a button to trigger it: trigger disarm.
Compatibility:
This script is using alias method, so it's unlikely it will cause any conflicts.
Terms of Use:
Free for use in both commercial and non-commercial.