How to set up traps in D&D style?

Title - I am wondering how you deal with dungeon obstacles in D&D style.
I’m not sure what you mean. Could you elaborate with a possible example?
The basic example is "step into X area, get blasted for X damage"
I could be misunderstanding what you are asking, but say I have am area on my map that is damaging. You could have a parallel event running that checking the party position. If the party is in the area, they take damage.

If they take damage, there is a wait before the parallel event checks the position again. If they are still in the area, repeat.

If not, the the event keeps checking to see if they return.

You could also have saving throws in there.

Is that generally on track?

Or am I completely missing the point?
I think I know what You're looking for, you need a Parrallel Event that checks for the Player to be in an Area near the Event, Once the Player is in any of the specified Coordinates, it will trigger the Trap, an Animation and deals damage to the Player/Party.

Edit:
We need a couple of Events for it: I went that route because its the easiest to do.
SS1.PNG

Prepare an Event as a Blank Event with a single Texture without any Self Switch necessary.
in Page 2 you want to make a Parrallel Event Page
SS2.PNG

Set it to Self Switch A, give it an Animation if you'd like, some sound and perhaps a Message that the Player took some damage.
Page 3 of this Event will display the triggered Trap:
SS3.PNG

NOW for the Detection part of the Trap:
SS4.PNG

we tell the game to turn ALL Events Surrounding the Trap to turn on their Self Switch A, thus ALL Events requiring that.
Add a Script Event for EACH of them.
NOTE: The Script Event at the Top ONLY shows what you need in order for it to work!
I tried using all lines in a single Script but I didn't manage to get it to work so having multiple Scripts run at the same time won't hurt the performance at all too!
Thank you @B3N4ZC4L for the tutorial!
1701122416324.png

Just something I came across about condensing the Event into a single one...
You want to check for the Player's Coordinates on your Map (For whatever Reason I can't get it to work into a single IF Statement but that's an Improvement over all already)


$gamePlayer._realX === 1 || $gamePlayer._realX === 2 || $gamePlayer._realX === 3 && $gamePlayer._realY === 5
This allows you to check if the Player is on either X coordinate from 1 to 3 on the Y Coordinate (1,5 2,5 and 3,5) edit this to your liking and enjoy!

NOTE: You can check at the Bottom of your RPG Maker from your Map
1701122630600.png

the Area you're marking with a single left-click will give you the coordinates you need for it to work
View attachment 285437
Just something I came across about condensing the Event into a single one...
You want to check for the Player's Coordinates on your Map (For whatever Reason I can't get it to work into a single IF Statement but that's an Improvement over all already)


$gamePlayer._realX === 1 || $gamePlayer._realX === 2 || $gamePlayer._realX === 3 && $gamePlayer._realY === 5
This allows you to check if the Player is on either X coordinate from 1 to 3 on the Y Coordinate (1,5 2,5 and 3,5) edit this to your liking and enjoy!

NOTE: You can check at the Bottom of your RPG Maker from your Map
View attachment 285438
the Area you're marking with a single left-click will give you the coordinates you need for it to work
again, danke schoen!
View attachment 285437
Just something I came across about condensing the Event into a single one...
You want to check for the Player's Coordinates on your Map (For whatever Reason I can't get it to work into a single IF Statement but that's an Improvement over all already)


$gamePlayer._realX === 1 || $gamePlayer._realX === 2 || $gamePlayer._realX === 3 && $gamePlayer._realY === 5
This allows you to check if the Player is on either X coordinate from 1 to 3 on the Y Coordinate (1,5 2,5 and 3,5) edit this to your liking and enjoy!

NOTE: You can check at the Bottom of your RPG Maker from your Map
View attachment 285438
the Area you're marking with a single left-click will give you the coordinates you need for it to work
I hate to necro this thread, but this is a really great tutorial!

One thing I am wondering, though, is if there is a way for the trap to harm enemies that walk through it?
You would have to check if any Event in the Map triggers it, if your game still uses the battle scenes you need to setup troops that gain damage IF Trap number X has been triggered (you could perhaps insta-kill the Event triggering the fight instead)

Original thread: https://forums.rpgmakerweb.com/threads/how-to-set-up-traps-in-d-d-style.163344/