Hello everyone! I'm going to show you how to make a working lantern effect for anyone looking for a tutorial. I'll do my best to explain it as simple as possible, and even present pictures on what was done. I'd like to thank
@Rubescen for showing me how they had theirs set up in RPG Maker MV. Although there are differences with MV and Ace, I was able to set it up to where I'm fairly satisfied.
How The Lantern Works
The lantern is a source of light that makes it easier for your players to see in dark areas in the game, and could either be a lantern, candle, or a flashlight. Without specific scripts, you're limited to what is used in the default program. So you may only be able to access the light source through the menu, but with the right command set up, you can link a button to the command in order to turn it off. In order to set this up, you may need to set it up in a common event.
Building The Script
Here is an image showing how the script was built. In the common event "Lantern On", build the event as follows. For the control variables, set it up as follows:
Create a "control variables" event - Variable -> single: 0001

layer X -> Operation "set" -> Operand: Game Data - "Player's Screen X" -> Character "Player's" - "Screen X"
repeat for the "Y" variable, and then add a "Show Picture" event and set it up to where you're comfortable. However, I'll explain how I have mine set up.
Number: 99
Graphic: Lantern Effect
Display Position: Center
Variables: Player X, Player Y
Zoom: 315 - 300
Opacity: 200
Type: Normal
Here is an image of how the command was set up!
When creating the button to turn off the event,
depending on if you're usingMV or
Ace, your button layout
may be different. For Ace users, "button L" is "Q" on the keyboard by default, so if you create this using "L", I suggest keeping a mental note to set up a text command upon picking up the light source telling players that "Q" will turn off/put away the light source.
Hopefully this helps anyone looking to do a common event lantern without any extra scripts!
本贴来自国际rpgmaker官方论坛作者:EcchiSamurai处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:
https://forums.rpgmakerweb.com/threads/how-to-make-a-working-lantern-effect-rpg-maker-vx-ace.126931/