Looking to make my game dark to make maneuvering around a tad difficult, anyways came upon this tutorial, I like it though it didn't do exactly what I needed it at least showed me a way to accomplish what I was setting out to do.
Only have 1 problem now though... when combat starts the battle is just as dark as the map was. Is there a way to set it so that when there is a battle, random or otherwise that the tinting goes back to standard lighting? Also, what about a directional flashlight type of deal while walking around? Using RPGMakerMV
1. For the Battle Lighting issue, try the following:
- Create a new Switch, call it "Default Lighting"
- On the Battle events, set the Lighting to Default at the start of battle (not sure of the exact turn settings, but make it happen just as soon as the battle starts), then turn the Default Lighting switch to ON.
- On the map of your game, create an event with the Auto Run trigger. Set the Condition Switch to be "Default Lighting", so that it triggers only if the Default Lighting Switch is ON.
Set the lighting to be dark on this event, and turn the Default Lighting to OFF right after. (Make sure that "Wait for Completion" is unchecked on the Tint Screen event)
This will make it so whenever the lighting is set to default, it gets dark right after battle. Note that you will need to include the battle event on every battle (unless you use something like Yanfly's plugin Battle Global Events, or whatever it's called), and similarly you will need to include teh map event that resets the lighting on every map.
2. For the directional light, it's a bit more complicated. Although it's also possible to do with event graphics, the best way is to probably do it using Pictures.
- Create 4 pictures with the directional light, up down left right. Name them appropriately
- Create a Switch called "Flashlight"
- Create a Common Event, cal it "Handle Flashlight Graphic" and make it trigger when the Flashlight Switch is ON. Set the Trigger to Parallel Process
- Create 2 variables named "Player X" and "Player Y"
- Set Player X to Game Data - Character - Player - Screen X.
- Same for Player Y but set to Screen Y instead.
- Create a Conditional Branch, on Page 3, choose Player is facing Down
- Inside the Conditional Branch, add Show Picture on Number "1", and set the image of the according flashlight set its position to Variables Player X and Player Y. "Origin" set to Center is probably the best. Set Blend Mode to "Screen".
- Do the same for all of the other directions, by changing the player facing direction and the appropriate flashlight graphic. You should have 1 conditional branch for each direction. Make sure the picture number is always the same, so they replace each other.
- Add a Move Picture Event Command and make its settings the same as the ones you just did for the Show Picture command, with the exception that here you don't need to set the image here.
This will make it so the image always follows you around, and the graphic of the flashlight changes based on the direction you're turned to. You may need to adjust the graphic until it fits correctly with the character.
- Create a Flashlight Item. Make it a Key Item, and set Consumable to "No". Occasion to Never.
- Create a new Common Event, call it "Flashlight System".
- Create a new Switch, call it "Flashlight System" as well.
- Create a Conditional Branch, set the condition to "Item - Flashlight", you can find it on page 4.
- Inside the Conditional Branch, add another Conditional Branch, and set the condition to be whatever button you want to activate the flashlight, such as Page Up, or Page Down.
- Inside the second Conditional Branch, add yet another Conditional Branch and check if the Switch "Flashlight" is OFF. Make sure to check "Create Else Branch" on this one.
- Inside this third Conditional Branch, add the command Set Switch "Flashlight" to ON.
- Inside the Else Branch, add the command Set Switch "Flashlight" to OFF.
This will make it so, if the Flashlight System is active AND the player has the Flashlight Item on the inventory, if they press the desired button, it will turn the flashlight on if it's off, and off if it's on.
It's a bit lengthy, but if you do every step as outlined, it should work seamlessly.
Make sure to set the Flashlight System Switch to ON whenever you want the player to be able to use the Flashlight. That way, you can make it like, a special room where the flashlight is not allowed, or it has no batteries, by simply turning the Flashlight System to OFF.