RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Mp/hp as a conditional branch for events?

0 Members and 1 Guest are viewing this topic.

*
Rep: +0/-0Level 40
RMRK Junior
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?

*
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Rep:
Level 96
&&&&&&&&&&&&&&&&&&&&&&&&&&&
GIAW 14: 2nd Place (Hard Mode)2013 Zero to Hero2013 Biggest Drama WhoreParticipant - GIAW 11Secret Santa 2013 ParticipantFor taking arms in the name of your breakfast.
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 / Feedback
Complaints, 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 for:



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

********
Furry Philosopher
Rep:
Level 94
Rawr?
2013 Best RPG Maker User (Creativity)Gold - GIAW 11 (Hard)Randomizer - GIAW 11Secret Santa 2013 ParticipantFor frequently finding and reporting spam and spam bots2012 Best RPG Maker User (Programming)2012 Best RPG Maker User (Mapping)Secret Santa 2012 ParticipantGold - GIAW 9Project of the Month winner for September 2008For taking a crack at the RMRK Wiki2011 Best RPG Maker User (Programming)2011 Best Veteran2011 Kindest Member2010 Most Deserving Of A Promotion2010 Best RPG Maker User (Technical)
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.




*
Rep: +0/-0Level 40
RMRK Junior
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!