Main Menu

Mp/hp as a conditional branch for events?

Started by Nekochan, September 22, 2013, 08:23:57 PM

0 Members and 1 Guest are viewing this topic.

Nekochan

So what I wanted to do was this:

There are certain objects that if interacted with, will ask if you want to use them at the cost of x amount of mp/hp.
There would be a conditional branch checking how much mp/hp the actor has before allowing/preventing the user from interacting with said object.

[Example]
An event over a book case would check to see if you had at least 10 mp.
If you did, you would get a window saying "Would you like to study?" with the appropriate choices and rewards following.
And if you did not have 10 mp, you would instead get a window saying "Sorry, you don't have the stamina for this."


Does anybody know how I can make a conditional branch dealing with mp/hp for events?

&&&&&&&&&&&&&

You posted this in the wrong area dude. Don't worry though, a mod will be along to move it to it's proper place.

Quote from: Board Support / FeedbackComplaints, Name change requests, suggestions, feedback or even just random questions related to RMRK itself.

This board is for questions about this site, not RPG maker. That board is over here.


As for your question. What I find easiest is,
1. Turn the player's MP into a variable
2. Use conditional branch to check variable

[spoiler]



[/spoiler]
&&&&&&&&&&&&&&&&

Zylos

First thing that comes to mind is a simple one. Simply set a variable before the conditional branch to equal the player's health, and base the conditional branch on that variable.

There is another way too. In the script section of the conditions in the conditional branch pop up, use "$game_actors[x].hp" and either > or < the amount you need, with the x being the actor's number that you want to check. Obviously you can substitute in mp instead of hp, and don't include the quotation marks.




Nekochan

Oh, man I can't believe I missed that. Sorry about posting in the wrong section.
Also, I tested out both methods and they both worked like a charm~

Thanks a bunch for the help, guys!