Making a Flashlight item that uses Batteries [Demo included]

Hyouryuu-Na

Sapphire Sodium
Veteran
Joined
Jun 15, 2017
Messages
947
Reaction score
2,217
First Language
Not English
Primarily Uses
RMMV
Hi! This is my first tutorial so I may not be able to explain things very well. This one is very easy to set up, once one understands the use of common events, variables and switches but I’ll still post this here in case someone has a hard time figuring out how to implement it.

Edit May 15th, 2020:
New Demo!
You can study how this demo was made and learn how to event a flashlight system.
Enjoy!


 
Last edited:

ddblue

新人
Veteran
Joined
Apr 9, 2013
Messages
132
Reaction score
17
First Language
English
Primarily Uses
Hello! I really love this method and hope to use it myself.

I've got it all in place without issue, but I was curious - is there a way to link it to player steps instead of frames?
Depending on a players monitor or settings, frame rate can vary quite a bit, but steps are pretty universal.

Anyway, I was just curious.

Thanks again for this tutorial!
 

Hyouryuu-Na

Sapphire Sodium
Veteran
Joined
Jun 15, 2017
Messages
947
Reaction score
2,217
First Language
Not English
Primarily Uses
RMMV
@ddblue I'm happy to know that you found this tutorial helpful. The reason I used frames was because I wanted to give the battery a life I.e the battery can die after particular time of usage. If we used steps, them it wouldn' work. Because, suppose, the player is standing in one place for quite some time. But the flashlight is on. Will the battery life be consumed? No. Because the batter's life is linked to th players steps. That didnt seem ok to me so I used frames instead. Though frame rates can vary in different computers, the overall playtime will remain constant because if frame rate is less, the game will run slow and if it' high,it'll run fast. Similarly, the battey life will exhaust slowly or faster depending on the speed the game runs in. That means,it' pretty much constant. That' Why I used frames. Well... This answer is pretty big but I hope you understand now. :)
 

ddblue

新人
Veteran
Joined
Apr 9, 2013
Messages
132
Reaction score
17
First Language
English
Primarily Uses
Thank you very much for clarifying :)
 

RachelTheSeeker

Suddenly, a summer breeze...
Veteran
Joined
Apr 13, 2012
Messages
403
Reaction score
587
First Language
English
Primarily Uses
RMVXA
Intense stuff, Hyouryuu! Though I'm using a torch system for my WIP game, it's still what I need to have torches that can be expended over time when entering the dungeon. Otherwise, I feel a lantern and lamp-oil system could work in place of a flashlight and batteries. Am working on a spiritual successor to the classic Wizardry CRPGs, heheh. :p
 

Hyouryuu-Na

Sapphire Sodium
Veteran
Joined
Jun 15, 2017
Messages
947
Reaction score
2,217
First Language
Not English
Primarily Uses
RMMV
Intense stuff, Hyouryuu! Though I'm using a torch system for my WIP game, it's still what I need to have torches that can be expended over time when entering the dungeon. Otherwise, I feel a lantern and lamp-oil system could work in place of a flashlight and batteries. Am working on a spiritual successor to the classic Wizardry CRPGs, heheh. :p
I'm glad you liked the tutorial. This method can be used for lamps and oil too ^^ and I think it's definitely possible to make torches used up over time. Perhaps it's easier than this because the batteries part was pretty complex haha. Good luck with your game! :D
 
Joined
Dec 27, 2018
Messages
4
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hi! I just started using RMMV and I'm kinda new to this. Your tutorial has been really helpful, unfortunately, I can't seem to make it work. The flashlight doesn't appear in the player's inventory once he aqcuired it.

Oh, and now I've been getting an error : Cannot read property 'clearLightBatlers' or undefined
 
Last edited:

Hyouryuu-Na

Sapphire Sodium
Veteran
Joined
Jun 15, 2017
Messages
947
Reaction score
2,217
First Language
Not English
Primarily Uses
RMMV
Hello! I haven't worked with this flashlight system for a long time. So even I forgot how I did it. ^^; But I'll look at the events and see how it was made. But the flashlight is supposed to appear in the inventory. Can you send me screenshots of the events? Or I can send you a demo. Yeah, I think that will be better.

About the error, I don't think the engine will show an error like that? It's most likely caused by the lighting plugin you're using. I will post the demo here after I make it. You can study it and see how things work.

A demo has been added. Please see that instead of the old tutorial.
 
Last edited:

aniaaous

lazy potato
Veteran
Joined
Jul 14, 2018
Messages
90
Reaction score
33
First Language
french
Primarily Uses
RMMV
Yep, The link is down!
 

Hyouryuu-Na

Sapphire Sodium
Veteran
Joined
Jun 15, 2017
Messages
947
Reaction score
2,217
First Language
Not English
Primarily Uses
RMMV
I sorta deleted it from my computer along with a ton of others to make space.
I'll reupload once I've made a newer project.
 
Last edited:

aniaaous

lazy potato
Veteran
Joined
Jul 14, 2018
Messages
90
Reaction score
33
First Language
french
Primarily Uses
RMMV
I sorta deleted from my computer along with a ton of others to make space.
I'll reupload once I've made a newer project.
Thanks a lot, ^^ And take as much time as you need just reply here when you update the link:kaoluv:
 

Hyouryuu-Na

Sapphire Sodium
Veteran
Joined
Jun 15, 2017
Messages
947
Reaction score
2,217
First Language
Not English
Primarily Uses
RMMV
No problem. Don't hesitate to ask questions if you have any ^^
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Are we allowed to post about non-RPG Maker games? And, if so, would any of you be interested in a short, proof of concept type non-euclidian puzzle game?
I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

A bit of a "sparkle" update to the lower portion of the world map. :LZSexcite:

Forum statistics

Threads
105,883
Messages
1,017,232
Members
137,607
Latest member
Maddo
Top