じ☆ve冰风 发表于 2026-7-12 09:28:35

POG_AlertRegion: Enables / disables switches by positioning the Player

https://tecnoanalogica386748854.files.wordpress.com/2020/10/alert.jpg?w=561​

License: Free for personal or commercial use.


Context: In games where player positioning is important for gameplay to trigger events depending on the player's position, it can be a tiring and repetitive task to exhaustion if all the tasks that involve this are done only by event commands.

Description: This script allows the developer to activate / deactivate switches when the player enters a land marked as a preconfigured region.

How to use this script: No plugin configuration is required. After activating it in the RPG MAKER MZ it will be ready to be used!

Configuring the map regions: For each map, the developer can configure up to 255 different regions. Setting up a region is quite simple, as long as the developer inserts a tag in the “Note” field in the Map settings where he wants the alert to work. The following theme tag structure:


<alertRegionID:switchId, value>​



[*]<alertRegion is the tag suffix
[*]ID is the region number
[*]switchIdis the number of the database switch that will be manipulated.
[*]value is the value to be assigned to the switch. It can be true, false or temp.

https://tecnoanalogica386748854.files.wordpress.com/2020/10/alert2.jpg?w=1024


Alert types: There are basically two types of alerts, a permanent alert and a temporary alert

2) Permanent alert: in this type of alert, a database switch is activated or deactivated when the player moves to a terrain marked as a pre-configured region. When he leaves this land, the state of the switch will not be changed.


https://tecnoanalogica386748854.files.wordpress.com/2020/10/alert4.jpg?w=1024

To set up a Permanent Alert, assign "true" or "false" to the value in the tag configuration.


Example 1: ACTIVATE switch 1 in the database when the player enters region 4.

<alertRegion1:4,true>


Example 2: DISABLE switch 2 from the database when the player enters region 10.

<alertRegion2:10,false>​


2) Temporary Alert: In this type of alert, a database switch is ON as long as the player remains in a terrain marked as a pre-configured region. When he leaves this terrain, the switch is turned off.


https://tecnoanalogica386748854.files.wordpress.com/2020/10/alert3.jpg?w=1024


To configure the temporary alert tag, assign “temp” to value in the tag configuration.

Example 3: Set switch number 3 in the database to be activated while the player remains on a terrain marked as region 89.
<alertRegion89:3,temp>​



本贴来自国际rpgmaker官方论坛作者:Logica处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/pog_alertregion-enables-disables-switches-by-positioning-the-player.128335/
页: [1]
查看完整版本: POG_AlertRegion: Enables / disables switches by positioning the Player