How to make make flash similar to Pokemon

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
832
Reaction score
671
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
680
Reaction score
321
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: 0
Last edited:

Latest Threads

Latest Profile Posts

Here in Fla were are seeing crazy covid spikes and some vaccinated getting bad infections. I had a mild fever on Thurs but it went down fast. How is everyone else doing. Hopefully you are all well. :)
Wish I was better at art, specifically that I was faster at it, bc this one NPC took Several Days to complete! It's gonna take So Extremely Long to do all of the art for my game, never mind writing it... Anyways, here's my gorgon, Hopernica Sthyxis!

57b88732c7abbcd84981dacf624a98495af61fcc.gifv
Idk if this is my ADHD or if it's a common problem. But I cant stay motivated for anything. I want to work on so many different things at once. Game dev, skateboarding, ranking up in League, playing OSRS, fitness, nutrition, relationships. It's like, where do I even begin?
Well. Looks like I need to redo the entire battle system in order to have the things I want in it. Also I'd like to say that console.log() is the greatest function in Javascript XD.

Forum statistics

Threads
113,817
Messages
1,077,698
Members
147,872
Latest member
hibixon
Top