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

[转载发布] Advanced Multiple Event Self-Switch Control

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    9071

    主题

    864

    回帖

    6万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 2026-7-31 19:25:51 | 显示全部楼层 |阅读模式
    Advanced Multiple Event Self-Switch Control
    Nathanial B.


    Introduction
    Designed mostly for myself, as I do a lot of puzzles etc. I hate having a bunch of switches to name/scroll through.. Most of them being tied to puzzles that are used once. So I wrote this script that allows you to control self-switches for other events. Even events on completely different maps. There's sound and delay options for effects, if you're able to find use for them.

    If anyone here finds use out of it, great. If not, I use it myself so it's self-serving   


    Features
    Control other events self-switches (A through D). You can manipulate dozens of event self-switches through one script call command.
     
    Set a timer delay per self-switch being turned on. Useful for puzzles/events, etc.
     
    Two sound options: Repeat sound per switch being affected or play a sound once. 

    How to Use
     Instructions:
     
     You can control other event self-switches by calling any of these commands:
     
     selfA(On/Off, Start Event, End Event, MapID, Wait Time, Sound Effect, Sound Count) 

     selfB(On/Off, Start Event, End Event, MapID, Wait Time, Sound Effect, Sound Count) 

     selfC(On/Off, Start Event, End Event, MapID, Wait Time, Sound Effect, Sound Count) 

     selfD(On/Off, Start Event, End Event, MapID, Wait Time, Sound Effect, Sound Count) 
     
    ------------------------------------------------------------------------------
     Arguments:
    On/Off,

    Start Event

    End Event

    MapID 

    Wait Time

    Sound Effect

    Sound Count
    ------------------------------------------------------------------------------
     Argument Usage:
     
     On/Off: True for ON, False for OFF
     
     Start Event: The first event to establish the order of events to be affected.
     If I want event 37 to be turned on first I would put 37.
     
     End Event: The last event to establish the order of events to be affected.
     If I want event 50 to be turned on last (after 37, like above) I would put
     50 here.
     
     MapID: The Map ID the events you're manipulating are on. 0 = current map.
     
     Wait Time: Time to wait (in frames) between switches being manipulated.
     If I wanted to turn the self-switch on for events 1-10 and have a 5 frame
     delay between each self-switch being affected, I would put 5.
     
     Sound Effect: File name of the SE to be played. If I wanted to play the sound
     effect stone.ogg I would put "stone". To play no sound effect simply put ""
     
     Sound Count: Should the sound play once for a group, or per switch affected?
     Set to 1 for the sound to play for every switch manipulated. Set to 0 for a 
     sound to play only once for the entire group of switches.
     
    ------------------------------------------------------------------------------
     Examples:
     To turn self-switch A ON for events 1-10 on map 37 with a 5 frame delay
     between switches with a sound playing for each switch:
     selfA(true, 1, 10, 37, 5, "stone", 1)
     
     You can reverse the order events are turned on by reversing the order of
     Start Event and End Event like so:
     selfA(true, 10, 1, 37, 5, "stone", 1)
     
     To turn self-switch B OFF for events 27-50 on the current map, with no delay
     between switches, and a sound effect playing ONCE for the entire group:
     selfB(false, 27, 50, 0, 0, "stone", 0)
     
     To turn self-switch D ON for evets 1-3 on map 82 with no delay between
     switches and no sound effect:
     selfD(true, 1, 3, 82, 0, "", 2)
     
     In the last example I set Sound Count to 2. This can be any number as long as
     it's not 0 or 1. Just make sure it's not left empty  


    Demo





    Script
    Available here.

    Version without sound (reducing arguments to remember):

    Available here

    Credit and Thanks
    - Nathanial B.

    Author's Notes
    Free for commercial usage, just give credit and let me know the title of your game.  



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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-8-17 20:16 , Processed in 0.071693 second(s), 53 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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