Auto-extinguishing torches

Status
Not open for further replies.

Vassago

Villager
Member
Joined
Dec 21, 2016
Messages
16
Reaction score
7
First Language
French
Primarily Uses
RMVXA
Hi guys,

I want to share with you a simple and fast method to create a light (torch, lantern, lighter or anything else) which comes on when an item is used by your inventory, and that comes off after a certain period of time. I already went through this with my game and works pretty well. I don't know if it's been know yet. The only script you need is the khas awesome light effect : https://forums.rpgmakerweb.com/index.php?threads/khas-awesome-light-effects.4917/
https://forums.rpgmakerweb.com/index.php?threads/khas-awesome-light-effects.4917/
1) First of all you have to create a commont event (named torch for example) and add a switch (torchON) into ON position.
2) Create a second switch named TorchOFF.
2) Then, create your item (a torch) and add your commont event "torch" into the "effects" area. The item must be useable only by inventory, of course.
3) Now, create an event into the first map where the player finds the item. This event must be set as parallel process, torchON switch as activation condition. So, when the item is used by inventory, the switch goes on and our event may start.
4) In our event, add this commands into the first page:

Script Call:
l = $game_map.lantern
l.change_owner($game_player)
l.set_graphic("torch")
l.set_opacity(180,30)
l.show

Wait: 999 frames
Wait: 999 frames
Wait: 999 frames

switch: torchOFF

5) Add a second page in our event and put torchOFF as activating condition (second page always as parallel process) and put this command:

Script Call:
l = $game_map.lantern
l.change_owner($game_player)
l.set_graphic("torch")
l.set_opacity(180,30)
l.hide

delete event


6) The last thing you should do is copy the same event into the following maps, but in this case the extinguish time is much faster
(Wait: 999 frames
Wait: 666 frames
)


The lenght of time the torch should wait before extinguishing depends on the size of your maps and on your preference.

Obviously, this method works fine when we have a small groups of dark rooms (as a sequence of caves). I'd say 3 - 4 linked dark maps, no more.

Let me know if you have some tips on how improve it!



 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
'Game Mechanics Design' is for discussing aspects of game play at a more conceptual level, rather than at the level of implementation. This is more of a tutorial. However, I can't move it to Tutorials as threads there need to be approved by the Mod for that section.

Please read the Guidelines (pinned topic at the top of the first page) and post a new thread in the appropriate format.

[mod]Closing.[/mod]
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,035
Messages
1,018,455
Members
137,821
Latest member
Capterson
Top