How to make MP drain when using an item?

Frain

Mastermind
Veteran
Joined
May 27, 2018
Messages
37
Reaction score
7
First Language
English
Primarily Uses
RMVXA
Hello! I spent few hours trying to figure out how should it work correctly. I gave up and I hope I can get some answers.
So, my point is basically, I want the MP to drain when using the flashlight (item). Let's say every 60 seconds it drains 3 points of MP. I want to make a system where the MP is the flashlight life, and batteries are used to restore the MP. The batteries work fine, they restore the MP. But the MP doesn't drain when using the flashlight! I tried this by using the common events, but it only works if I put the minus value in the "Turn off flashlight" common event. Otherwise nothing happens. I use Victor Light Effect script. Here are some screenshots of what I have so far:
flashh.png

flasshon.png

flasshhoff.png

batterysys.png
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,418
Reaction score
591
First Language
Italian
Primarily Uses
RMVXA
Trigger a switch and use a parallel process common event that lowers MP each second (using a wait command). If MP are 0 then the torchlight runs out. You can put everything in the same common event.
 

Frain

Mastermind
Veteran
Joined
May 27, 2018
Messages
37
Reaction score
7
First Language
English
Primarily Uses
RMVXA
Trigger a switch and use a parallel process common event that lowers MP each second (using a wait command). If MP are 0 then the torchlight runs out. You can put everything in the same common event.
Hey, hey, it works! Thank you so much! I was missing the variable for the player MP and I didn't set the conditional branch. Now it works like charm. I have one more small question: Is there a way to display MP status somewhere on the screen once flashlight is activated?
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,573
Reaction score
6,496
First Language
Indonesian
Primarily Uses
RMVXA
Is there a way to display MP status somewhere on the screen once flashlight is activated?
This is going to need a script. So it's a different request. I suggest u start a new one in the RGSS3 request forum.
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,418
Reaction score
591
First Language
Italian
Primarily Uses
RMVXA
It is theoretically doable with a script call but I do not recommend doing it. You have to be careful and properly delete the bar when needed. I would definitely do it with a script rather than relying on a script call.
 

Frain

Mastermind
Veteran
Joined
May 27, 2018
Messages
37
Reaction score
7
First Language
English
Primarily Uses
RMVXA
This is going to need a script. So it's a different request. I suggest u start a new one in the RGSS3 request forum.
It is theoretically doable with a script call but I do not recommend doing it. You have to be careful and properly delete the bar when needed. I would definitely do it with a script rather than relying on a script call.
Alright, thanks for help! :)
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Another plugin complete and ready for Wednesday!
Just for the record I have greatly enjoyed the past couple months of using RPG Maker MV - enough that I went ahead and bought MZ although it's going to be a bit before I seriously start a project with that.
I have a pretty reasonable alpha of one game that's got roughly 4 hours of content and some bits and pieces of others after only about 300 hours total time and about 2 1/2 months of owning RPG Maker.....
I completely forgot which forum had the personal blogs for members. :LZSlol: It was probably a forum for the Ace program. I was going to see about posting a blog post, but I'm too tired, and if its associated with Ace, then its a moot point. :LZSlol:

Forum statistics

Threads
102,971
Messages
996,381
Members
134,433
Latest member
just_herefortheplugins
Top