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

[制作教程] Custom Event Triggers Script Explanation & Tutorial

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

    连续签到: 2 天

    [LV.7]常住居民III

    4446

    主题

    864

    回帖

    2万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 3 天前 | 显示全部楼层 |阅读模式
    This article is to cover a script in RPGMaker Ace by Hime Works, Namely the Custom Event Triggers script. I’ll be covering its overall usefulness, the application of these additional triggers in managing parell processes. Also why this is a great utility as a whole to have while developing in a game engine to have said triggers available. The basic structure and simplicity of RPGMaker Ace for event triggers can be nice, but it has its shortcomings. This script is a step in the right direction for making up for some of these shortcomings.      

                                                                                                                                                       Player_Leave


    • Will be the trigger that I'll cover first, This is a trigger that’s activated when a player leaves the event they pass over,That's below the charcter, Though there's a way you can accomplish this with utilizing “Player_Leave” as a trigger,You can do this by Putting the event below the character’s priority,Then Causing X switch to activate and when X switch activates, it  triggers events that you have set the perimeter for in the events pages beforehand. Though this is a way to accomplish  this without the use of this script, it involves changing the character transparency to 0, scrolling the map around appropriately with the stuff you want to show and running either a autorun event or parallel process and as well making sure they are timed properly and end properly,which is normally a pain to time properly. Because if you don’t, the game can freeze up and any sound effects in the event will play on a loop,etc, etc. Overall though this is a poor solution and is more likely to have game breaking bugs,that would force your player to restart it or only fixable by the game dev releasing an update,this is due to the nature of a parell process. As a player that can be very frustrating mechanic to deal with, not to mention proper timing is nightmare this way and making sure the transparency turns back to normal.So this trigger makes a rough job alot easier to deal with.Here's a example and demostration of how to use comments to set when to use these triggers and how to set it to the region id. 
                                                                                            




                                                                                                                                                    Timer_Expire


    • This trigger is very straight forward and it’s just how it sounds. You start a timer and when said timer expires, It will trigger the events and process you set up in that event to completion, thats ya set in the comment function. A alternative way that you can accomplish this is by using a wait event and averaging out the frames that it would take equal to (xx) seconds, But this method is very limited, cumbersome and the timers are short.So some of the parts of that event would become inappropetly repetitive to program properly and accordingly, But For some events this works just fine anyway.In cases in the example video below “A bomb is gonna explode after 10 minutes,unless you can disarm it.”, It’s a lot more cumbersome and honestly you’re gonna have to crunch some numbers out and figure out how many frames ya would need to equal the seconds it would be in total. Even though most game’s that are made in this engine average about 60fps,but have little to no way guarantee it hiccup on the fps. So you get the idea why this is a poor solution and the value of this trigger. (Also to clarify a bit, any event with a timmer command on the said map your using the trigger in and whichever timer comes first also.)
                                                                                         





                                                                                                                                           Region_Enter & Region_Leave


    • These two triggers are useful to make npc/events seem more intelligent and help traps work more organically, It functions similar to a "player's touch" trigger in a lot of ways,except it uses players touch with Region Spefic id's.Here's a example of this along with a example of how to set it up,Lets say our player finds a garden that’s being protected by a guard,Then our player decides to goes inside of it, Because of it a npc tells them to get out of their before they crush any crops.Then you set a self switch on, that causing the Event to switch over to the proper another event page, so the next time the guard will attack the player instead. Now let us take that roughly the same context and apply it to when a player leaves a region instead. It can toggle the self switch back off so the players safe,for now,unless he enters it twice or steps ons aid crops. Another example of “Region_Leave” would be the player is detained and told to stay put and wait for the guard to come back while another one watches him, if the player leaves that spot/area it’ll trigger a guard to say ”I said stay put!” or attack them. Both of these commands also make a list of the region id’s on said map also when triggered..








                                                                                                                                                   Event_to_Event


    • This one sets it up so only event (XXX) can trigger another event, rather than just any event touching it. It can also be set to be activated by players touch by denoting appropriately (The players event id is -1 bwt,but thats explained in the script itself also).It comes in handy for making cutscenes, traps or puzzles in the game itself. A example of this is a few npc’s walks over a bridge and the first npc makes it and when the second one crosses the bridge, It collapses and they fall into a raging river below when they touch (xxx) event.also another example is one pc ignores you no matter what you do untill a chick he likes gets closer to him,So as to not look like an jerk.






    • Now finally we’re going to cover using these triggers as a parallel processes in general ,this can cause parallel processes to act diffrently then normal, if you put the proper commands in the comment section of the event itself its a effective tool to help manage them properlyw ithout looping issues.It modifies it so instead of it starting and running constantly, or causing more than one event to run at the same time. It will wait for the custom triggers condition to be met first and hence aid in appropriately timing them. Which comes in handy for timing parellel events much more easily than just setting a bunch of wait commands over and over again, Also once again you have to crunch numbers out and still their is no guarantee it’ll be timed properly. This helps make sure that parallel processes are timed appropriately and everything goes as planned. That about covers it roughly, Thanks for reading, I hope this helps clarify things for you and have a good day everyone.



    本贴来自国际rpgmaker官方论坛作者:dracossaint处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/custom-event-triggers-script-explanation-tutorial.46210/
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-7-14 14:28 , Processed in 0.130167 second(s), 55 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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