07-13-2013, 04:16 AM
Think of it as an alarm or sensor system.
Place an event on your map and make it... oh, I dunno... a rock. Make the 'trigger' for that rock to be a parallel process so it runs constantly. In the 'Event List' window on the right, you insert a script call command. A script call is where you can run an RGSS script (like view range) instead of your typical move-event/show-text commands. Now with that view range command, you set up a few values like the event's own id, a range and a switch that is turned on.
This example assumes that you are checking a circular range around event #12... for a distance of 5 tiles around it. And if the player is detected in this range, RMXP's switch #3 is turned on.
Oh... and there's a cool system to change audio volumes when you get closer or further from a source.
What you do when Switch #3 is turned on is up to you. You can make a guard ticked off.... a gate closes behind the player... the planet Krypton blows up... etc.
Place an event on your map and make it... oh, I dunno... a rock. Make the 'trigger' for that rock to be a parallel process so it runs constantly. In the 'Event List' window on the right, you insert a script call command. A script call is where you can run an RGSS script (like view range) instead of your typical move-event/show-text commands. Now with that view range command, you set up a few values like the event's own id, a range and a switch that is turned on.
$view_range.event_view(12, 5, 3)
This example assumes that you are checking a circular range around event #12... for a distance of 5 tiles around it. And if the player is detected in this range, RMXP's switch #3 is turned on.
Oh... and there's a cool system to change audio volumes when you get closer or further from a source.
What you do when Switch #3 is turned on is up to you. You can make a guard ticked off.... a gate closes behind the player... the planet Krypton blows up... etc.

![[Image: QrnbKlx.jpg]](https://i.imgur.com/QrnbKlx.jpg)
![[Image: sGz1ErF.png]](https://i.imgur.com/sGz1ErF.png)
![[Image: liM4ikn.png]](https://i.imgur.com/liM4ikn.png)
![[Image: fdzKgZA.png]](https://i.imgur.com/fdzKgZA.png)
![[Image: sj0H81z.png]](https://i.imgur.com/sj0H81z.png)
![[Image: QL7oRau.png]](https://i.imgur.com/QL7oRau.png)
![[Image: uSqjY09.png]](https://i.imgur.com/uSqjY09.png)
![[Image: GAA3qE9.png]](https://i.imgur.com/GAA3qE9.png)
![[Image: 2Hmnx1G.png]](https://i.imgur.com/2Hmnx1G.png)
![[Image: BwtNdKw.png%5B]](https://i.imgur.com/BwtNdKw.png%5B)