- 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!
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!

