I want to create a fire trap in MV but idk how

"fire trap" means if player steps onto it, the whole party will receive HP damage CONSTANTLY (like -10HP per second)

I know stupid a way which i think may consume a lot of CPU resource by setting up a parallel event with a conditional branch of a variable check, and then i set the variable to -10 when player steps on the fire event and to 0 when player gets out( set up four stupid events around the fire to make sure the variable will be set correctly and player not burn to death when stepping out)
Clipboard01.png


I want to know whether there is a DECENT/ELEGANT/NEAT way to make this happen?
you can use parallel process event which check player coordinate... if player is on top of any event with the "FLAME" name then deal damage... else do nothing... don't forgot to add wait on the parallel process event...

you can do that by creating parallel process event... then at the top
do conditional branch -> script:
Code:
$gameMap.eventsXy($gamePlayer.x, $gamePlayer.y).length !== 0 && $gameMap.eventsXy($gamePlayer.x, $gamePlayer.y)[0].event().name.match(/flame/i)
the conditional branch script is a bit long because it also prevent crash if no event below the player.
next step... inside that conditional branch deal damage to entire party -10 hp (you can also add sound and animation effect).
then outside the conditional branch add wait 60 frame (1 second)...
finally proceed to name all your 'flame' event containing "flame" as the name... you can name it flame001, flame002, etc... as long as the name contain 'flame'

this is example parallel process event:


this is example 'flame' event:

don't forget to set it as below character so player can step on it...
hope this help
It works, it works!!
OMG!OMG!OMG!OMG!OMG!!!

thank you soooooooooooooooooooooo much!
Now i think i can make a lot of things in my game!
cool!

Original thread: https://forums.rpgmakerweb.com/threads/i-want-to-create-a-fire-trap-in-mv-but-idk-how.133728/