barrydwiseman

Villager
Member
Joined
May 1, 2021
Messages
7
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hi I'm trying to create a torch in RPG Maker MV similar to flash in Pokemon,

Where the player enters a dungeon and its dark. They then use a torch to light up the map until the player leaves the area, how do I make it so the player has to use another torch to light up the map?

Ideally, I'd like the player to be able to use "flash" once, it lights up the innitial place of use and the rest of the map till they exit and it turns off "flash", when they enter the same map again, its dark until they use "flash" again.

Thank you, hope theres something there for this..
 

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
848
Reaction score
705
First Language
English
Primarily Uses
RMMV
When they enter the dungeon, a parallel event sets screen tint to something dark and hard to see, then erases itself.

When using the torch, it calls a common event that sets the screen tint to normal, making things possible to see.
 

barrydwiseman

Villager
Member
Joined
May 1, 2021
Messages
7
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hi there

I tried the screen tint, but Im unable to get it right.

I just found Terrax Lighting for RPG Maker MV however, but I cant seem to get what I want either.

Basically all I want is the light radius of the player to be small when entering say a dungeon, then they can use a torch to increase light radius or visibility.

When the player is going to other rooms in the dungeon I'd like the torch to remain on room to room.

Then when they exit the dungeon, the torches effect is turned off and when they enter the dungeon again, they have to use the torch item again to increase visibility.

I made an event on each room of the dungeon and placed "Light 0 #FFFFFF" on the notes part to activate lighting.

I've made a torch item which calls a common event that increases light radius using the plugin command "Fire radius 300 #d1b677 SetFire 10 10 2".

It seems every room in the dungeon is lit up after using the torch. However, when exiting the dungeon and re-entering, it remembers the torches effect which is plug-in command "Fire radius 300 #d1b677 SetFire 10 10 2" instead of the default "Light 0 #FFFFFF".

I tried numbering the light source on the common event thus the "2" in the plugin command above. I thought by numbering it 2, I could use the plugin command "Lights on 2" first then "Lights off 2" on another event when I want it off but it didn't work.

I placed a Player Touch event on the ground to test it which has plugin command "Lights off 2" but when stepped on its not removing the torches effect.

I even tried placing the common event from Flow Control to a Player Touch event but it didn't work either.

How would I tackle this or is there something simple Im missing?

Do I need to place an event with "script deactivate" plugin command on autorun/parallel on the world map to reset the lighting after exiting the dungeon? Then "script activate" autorun/parallel on the dungeon?

Thanks for any input.
 

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
737
Reaction score
360
First Language
PT-BR
Primarily Uses
RM2k3
I don't know if the "Flash" of the most current generations are different, but I played the versions of GB Color.
I made a system similar to this using events only, but I don't remember all the details.

Common Event: Dark Inside -> Trigger: Process Paralel -> Switch: Dark Place
Code:
◆Control Variables:#0019 Dark-ScreeX = Screen X of Player
◆Control Variables:#0020 Dark-ScreeY = Screen Y of Player
◆Control Variables:#0020 Dark-ScreeY -= 24
◆Show Picture:#20, Effect-Dark_Place, Center ({Dark-ScreeX},{Dark-ScreeY}), (100%,100%), 255, Normal
◆Tint Screen:(0,0,0,0), 15 frames
◆Loop
  ◆Control Variables:#0019 Dark-ScreeX = Screen X of Player
  ◆Control Variables:#0020 Dark-ScreeY = Screen Y of Player
  ◆Control Variables:#0020 Dark-ScreeY -= 24
  ◆Move Picture:#20, Center ({Dark-ScreeX},{Dark-ScreeY}), (100%,100%), 255, Normal, 2 frames (Wait)
  ◆If:Dark Place is OFF
    ◆Break Loop
    ◆
  :End
  ◆
:Repeat Above

Common Event: Item Flash -> Trigger: None
Code:
◆If:Dark Place is OFF
  ◆Text:None, Window, Bottom
  :Text:You cannot use the flashlight at this time.
  ◆
:Else
  ◆Control Switches:#0020 Dark Place = OFF
  ◆Wait:10 frames
  ◆Move Picture:#20, Center ({Dark-ScreeX},{Dark-ScreeY}), (1000%,1000%), 0, Normal, 30 frames (Wait)
  ◆Erase Picture:#20
  ◆
:End

Database -> Items -> Create a new item
Name: Flash
Icon: Touch or
Consume: No
Scope: None
Occasion: Menu Screen
Type: None
Effects: Common Event -> Item Flash

Map: Outside the cave -> Event that transfers inside:
Code:
◆Tint Screen:(-255,-255,-255,0), 15 frames (Wait)
◆Transfer Player:Cave-Inside (36,49)
◆Control Switches:#0020 Dark Place = ON

Map: Inside the cave -> Event that transfers outside:
Code:
◆Control Switches:#0020 Dark Place = OFF
◆Transfer Player:Cave-OutSide (7,7)
◆Erase Picture:#20
◆Tint Screen:(0,0,0,0), 15 frames (Wait)

References:

Edit:
@barrydwiseman
When I made this explanation it was not on my computer, so I found some flaws.
I updated and corrected it, also attached is an image that will be used as the Picture of ID 20.

One of the problems is that the "Loop" within the first event does not stop even when the Switch is turned off, causing the whitening effect to not happen.
Another is that the item was enabled to be used in battle as well (Always).

If you find it necessary I create a playable and editable demo.
 

Attachments

  • Effect-Dark_Place.png
    Effect-Dark_Place.png
    10.9 KB · Views: 1
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

Working in the IT industry:
- "How long does it take?".
- "It takes 1 month".
- "What if we add more people to the project?".
- "It would take 2 months".
Doing RPG Maker News for 16th September 2021

Stream is live! I am currently doing pixel art and will be practicing shading! Feel free to drop by!
wow, Surface Tension is really one MF of an FPS level huh
So, I got let go from my current job because my skill set didn't align with the department's goals anymore. I have some hope, because I am currently in contact with a manager from a different department, and they are desperate for more employees. We'll see what happens... :kaoswt:

Forum statistics

Threads
115,121
Messages
1,087,380
Members
149,608
Latest member
SgtSalamander
Top