I'm using the Terrax Lighting plugin and wanted to make it so the player only has a light around them if they acquire the
flashlight item. I'd like to make it so its toggled by using the flashlight from the inventory if possible but if not thats fine.
Flashlight Item
● ARCHIVED · READ-ONLY
-
-
Hello,
This is how I would set up a flashlight using Terrax Lighting that can be used from the menu.
STEP 2
STEP 3
I hope this helps! If you want to let the player toggle the light via a key press instead of having to go through the menu, I can explain that, too. -
Hello,
This is how I would set up a flashlight using Terrax Lighting that can be used from the menu.
STEP 1Make a flashlight item that runs a common event to control the light toggle.
View attachment 95371
STEP 2Make a common event to control the flashlight
View attachment 95372
The first Conditional Branch toggles a switch. The second turns the light on and off depending on if the Flashlight switch is active.
STEP 3Give the player the flashlight item, and they can now use it to illuminate their way!
View attachment 95373
View attachment 95375
NOTE: I used Tint set #333333 plugin command at the start of the map to give the room a little ambient light.
I hope this helps! If you want to let the player toggle the light via a key press instead of having to go through the menu, I can explain that, too.
Thank you so much, I really appreciate your help! I'm not going to be making a hotkey but thanks for your help : ) -
You're welcome! Good luck with your project! :kaojoy:
-
You're welcome! Good luck with your project! :kaojoy:
I'm planning on this passion project being a big success. Not sure if it will actually happen but if you want credit for your contribution then i'm more then happy to put your name in the credits in game and a .txt -
You're welcome! Good luck with your project! :kaojoy:
Is their a way to make it so when the flashlight is off, that random encounters occur less? -
Hello,
This is how I would set up a flashlight using Terrax Lighting that can be used from the menu.
STEP 1Make a flashlight item that runs a common event to control the light toggle.
View attachment 95371
STEP 2Make a common event to control the flashlight
View attachment 95372
The first Conditional Branch toggles a switch. The second turns the light on and off depending on if the Flashlight switch is active.
STEP 3Give the player the flashlight item, and they can now use it to illuminate their way!
View attachment 95373
View attachment 95375
NOTE: I used Tint set #333333 plugin command at the start of the map to give the room a little ambient light.
I hope this helps! If you want to let the player toggle the light via a key press instead of having to go through the menu, I can explain that, too.
So, this was extremely useful, thank you very much! I just got started with RPGM MV and this saved my life. Though, I would like to know how to toggle the light by pressing a key :3 -
Hi, I'm glad it helped! Here's how I make it work with a key press.
On the maps that you want to be able to use a flashlight, create an event with a Parallel trigger.
Check the Item condition on the left to only run this event when the party has the flashlight item in the inventory.
In the contents of the event, make a conditional branch that uses the Script option. For this example, I'm using the Page Up key to toggle the light, so in the script box I put the code
Input.isTriggered("pageup")
(You can change pageup to a different key if you want)
Then have the conditional branch call the Use Flashlight common event from the above post. And with that you should have a working flashlight toggle. :) -
Hi, I'm glad it helped! Here's how I make it work with a key press.
On the maps that you want to be able to use a flashlight, create an event with a Parallel trigger.
View attachment 105605
Check the Item condition on the left to only run this event when the party has the flashlight item in the inventory.
In the contents of the event, make a conditional branch that uses the Script option. For this example, I'm using the Page Up key to toggle the light, so in the script box I put the code
Input.isTriggered("pageup")
(You can change pageup to a different key if you want)
Then have the conditional branch call the Use Flashlight common event from the above post. And with that you should have a working flashlight toggle. :)
Thank you for your quick reply! I tried doing that, unfortunately it doesn't work... -
Hmm, I'm not sure why it didn't work. Here's another way that doesn't need the parallel event.
You will need to add 2 plugins from http://yanfly.moe to your project for this method.
YEP_CoreEngine
YEP_ButtonCommonEvents
In the plugin manager for the Button Common Events, set whichever key you want to be the flashlight toggle to the common event "Use Flashlight"
And adjust that common event with a conditional to make sure the player actually has the flashlight item.
I hope this works out for you. -
Well, insomnia is keeping me awake tonight so I might as well just try that, thank you again :D
-
@djooks I have deleted your post. Please do not spam threads with off-topic on-liners.