As the title suggests, I am trying to make a stealth section for my game using events. The way I've implemented it so far is to have an enemy standing still and occasionally turn around, every time they turn around new detection tiles will appear on that side and a new switch is turned on, the previous turned off (They are separate events and are visible as red markers). My problem however, is that the player can completely avoid being detected if they stand still, the trigger for player touch doesn't account for the player standing still. What could I do to fix that?
Trying to make a Stealth section
RPG Maker MZ SupportIf you want to go event only, maybe you can have the trigger zones themselves move and set them to Event Touch? That way they'd activate if they touch the player
Say, the event turns to look down, all trigger zones activate and then immediately take one step down.
The cleaner way would be to check coordinates.
Make NPC a Parallel event in, say, X 5, Y 10, save those as two variables. NPC looks down.
Check player coordinates, save those as two more variables.
If the player is also in X 5, you know if he's on the same vertical line.
If he is, check if player Y > 10. Now you know if he's above or below the NPC: if he's below, activate the trigger!
Buuut the cleanest way, which is what I suggest, is using a plugin. Think it's just a lot less work on your part and it'd run better
This one's pretty good, it activates a switch or self switch when the player enters line of sight or gets close, AND it free!
reflector88.itch.io
Say, the event turns to look down, all trigger zones activate and then immediately take one step down.
The cleaner way would be to check coordinates.
Make NPC a Parallel event in, say, X 5, Y 10, save those as two variables. NPC looks down.
Check player coordinates, save those as two more variables.
If the player is also in X 5, you know if he's on the same vertical line.
If he is, check if player Y > 10. Now you know if he's above or below the NPC: if he's below, activate the trigger!
Buuut the cleanest way, which is what I suggest, is using a plugin. Think it's just a lot less work on your part and it'd run better
This one's pretty good, it activates a switch or self switch when the player enters line of sight or gets close, AND it free!
Proximity Sensor (RMMZ Plugin) by reflector88
Easy-to-use plugin for adding proximity and line of sight to RPG Maker games.
reflector88.itch.io
That plugin works perfectly, it's exactly what I was looking for, thanks!
Original thread: https://forums.rpgmakerweb.com/threads/trying-to-make-a-stealth-section.180095/