设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 138|回复: 0

[转载发布] [FROG] Trigger Distance - Fire touch events at a distance

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-9-3 22:57
  • 签到天数: 211 天

    连续签到: 1 天

    [LV.7]常住居民III

    9075

    主题

    866

    回帖

    7万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    64419
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    74390

    灌水之王

    发表于 2026-7-26 19:31:33 | 显示全部楼层 |阅读模式
    TriggerDistance 1.21
    by Frogboy


    Introduction

    This plugin allows you to set up Player Touch activation that covers an area or line of tiles around it.  It is mainly used to avoid duplicating the same Event multiple times in order to cover more than one square.  By specifying your parameters in a comment on an Event page, the Player Touch Trigger can be fired when your Player is at a specified distance from the Event and/or on a certain axis.  I've also added functionality to list specific modes of travel that will trigger an event.  Now you can fly your airship to a floating island but not walk or sail into it from the ground.  Yay!

    This plugin now also supports Event Touch triggers at a distance. A moving event with an Event Touch trigger will activate if it steps within range of the Player.

    Features

    • Adds the ability to specify which modes of travel will activate a Player Touch Trigger.
    • Saves a ton of time.  Who hasn't copied events and pasted them on multiple nearby squares and then need to change something which forces you to delete them all and re-paste the change back in?  Now you just have one event to deal with.
    • Easily do an edge transfer with a single event.
    • Easily span an Event across a wide hallway that starts a cut scene.
    • Make an NPC talk to you when you get near them without forcing the player to walk all the way to them and initiate the conversation.
    • Makes your project leaner by reducing the amount of events that need to be tracked and processed.
    • Can save on switches when you have lots of copied events that need to turn off together when activated.

    How to Use

    On an Event page that has a Player Touch trigger, create a Comment and enter it in this format: <TriggerDistance: parameters>
    Parameters are separated by a space.

    The following parameters are supported. Each one is immediately followed by a number to specify the distance in squares/tiles that the Event should fire.

    • r# - Radius (Any square within # of Event)
    • x# - X-Axis (Any square within # of Event on the X-Axis [left/right])
    • y# - Y-Axis (Any square within # of Event on the Y-Axis [up/down])
    • s# - Switch Binding (Will turn ON the specified Switch ID and not fire again while the Switch is on)
    • combo - This tells the event to look for both Player and Event Touch conditions.
    If both x# and y# are specified, the trigger range will form a square or rectangular area as opposed to just covering the two axis.

    These can also be specified in the parameters to indicate which modes of travel this event will fire for. If you specify none then the Player Touch will always trigger.

    • walk - Player Touch will trigger if you are walking
    • boat - Player Touch will trigger if you are on your boat
    • ship - Player Touch will trigger if you are on your ship
    • airship - Player Touch will trigger if you are on your airship

    Examples

    X-Axis: <TriggerDistance: walk x5>
    Will cover the Event square and 5 tiles to the left and right of it.  Great for spanning a large hallway or exit.  Only fires when walking.





    Y-Axis: <TriggerDistance: boat y2>
    Will cover the Event square and 2 tiles above and below of it.  Only fires when in your boat.





    Radius: <TriggerDistance: walk r3>
    Will cover the Event square and 3 tiles in all directions.  Only fires when walking.





    Rectangle: <TriggerDistance: x4 y2>
    Will cover an area that spans 4 tiles along the x-axis and 2 tiles along the y-axis.





    Edge Transfer: <TriggerDistance: x999>
    Will cover the the entire edge of the top or bottom of a map.  It doesn't have to be the top or bottom edge but that's what it is typically used for. The number is set purposely large to cover any size map.  Fires for all modes of travel.

    Edge Transfer: <TriggerDistance: y999>
    Will cover the the entire edge of the left or right of a map.  It doesn't have to be the left or right edge but that's what it is typically used for. The number is set purposely large to cover any size map.  Fires for all modes of travel.

    Radius with Switch: <TriggerDistance: r2 s12>
    Will cover the Event square and 2 tiles in all directions, will turn on Switch ID 12 and not fire an Event Touch again while Switch 12 is ON.  Fires for all modes of travel.

    Player Touch only fires when you are in your airship: <TriggerDistance: airship>
    No radius, x or y specified so this only covers the event tile.


    Terms of Use

    This plugin can be used in commercial or non-commercial projects.
    Credit Frogboy in your work.


    Changelog

    Version 1.1 - Initial Release
    Version 1.2

    • Added support for ranged Event Touch Triggers.
    • Rectangular cover when specifying both x# and y#.
    • Bug fix - Wasn't respecting 4-direction passage.
    • More Aliasing.  This plugin isn't nearly as greedy as version 1.1
    Version 1.21 - Bug fixes

    Download

    My Plugins Page - https://frogboymv.github.io/
    Trigger Distance Plugin - https://github.com/FrogboyMV/TriggerDistance


    本贴来自国际rpgmaker官方论坛作者:Frogboy处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/frog-trigger-distance-fire-touch-events-at-a-distance.88311/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-9-15 11:22 , Processed in 0.123559 second(s), 55 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表