KTouchNewMapEvent VX
KTouchNewMapEvent VXby Kyonides Arkanthes
Introduction
Did you ever want that the engine would autorun events right after being touched by the player or another event?
Especially once it finishes transferring the player to a new map...
Now you can do that! Just copy and past the following snippet on your script editor!
Ruby:
# * KTouchNewMapEvent VX# Scripter : Kyonides Arkanthes# 2022-09-29# * Plug & Play Script * ## This scriptlet allows you to run an event after being transferred to another# map. It will run even if the trigger were the Player Touch or Event Touch one.# * Aliased Method: Game_Event#initializeclass Game_Playerattr_reader :new_x, :new_yendclass Game_Eventalias :kyon_touch_new_map_event_init :initializedef initialize(map_id, event) kyon_touch_new_map_event_init(map_id, event) check_shared_locationenddef touch_trigger?() .include?(@trigger) enddef player_new_x?() $game_player.new_x == @x enddef player_new_y?() $game_player.new_y == @y enddef check_shared_location start if touch_trigger? and player_new_x? and player_new_y?endend
Honestly, there are other ways to trigger events without using scripts. Yet, you can still use my scriptlet to make it possible by setting its trigger as Player Touch or Event Touch.
Terms & Conditions
Free as in beer and as in speech.
Please include my nickname in your game credits.
本贴来自国际rpgmaker官方论坛作者:kyonides处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/ktouchnewmapevent-vx.151641/
页:
[1]