Main Menu
  • Welcome to The RPG Maker Resource Kit.

[Request]Battle Ending

Started by Marlune, September 25, 2006, 01:37:23 AM

0 Members and 1 Guest are viewing this topic.

Marlune

I need a script so that if a hero uses an item in battle it has an X chance of ending the battle in a victory. Any ideas on how to do that?
Current Project: FuRPG
Progress:||||||||||
Mappers:Nicholas, Odin
Eventer:BPKS0

SexualBubblegumX

Mess with vairables. I can probably think of way to do it........ If I remember.

Blizzard

#2
Call a common event and set one variable to a random number between 1 and 100. Check if it´s under X (in percents) and use the abort battle command.
Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.



Get DropBox, the best free file syncing service there is!

Marlune

See I would do the call event If I could fin the command for it. >.< I looked up and down the list of commands and couldn't find it.
Current Project: FuRPG
Progress:||||||||||
Mappers:Nicholas, Odin
Eventer:BPKS0

Naphe

Not to neccessarily challenge Blizzard, she/he is only partially right. I shall provide a tutorialistic solution to your problem.

Make a new switch and name it whatever that item name you want to use is named.

Then go database and find the tab that says comment event.

Make a new comment event, and have it be set to parallel process and set the trigger to be the trigger that you just previously made. *Name it whatever you want*

Then inside the common event make a new variable operation and make a variable named *Random Chance* and click set then look where it says random number 0 - 0 and click the marker before it to enable this action.

Then set the second 0 to 10, and press okay.

Then create a new conditional branch, and look where it says variable and then click the marker before it to enable this action ,and set the variable being determined to *Random Chance*, then set the equation to *<=*, finally to change the percentage that this will work change the constant to a number 1-10 and keep the box at the bottom checked and click okay. *The lower the number the lower the chance of it happening*

Now look for the *end battle* trigger as well as an event to turn the *item name* trigger off, and put that in the conditions meet section NOT in the else section and make sure to put the event that turns the trigger off, after the end battle trigger.

Now underneath the else trigger create a new *message* event and have it say something that tells the player that it failed or something similiar like that, and create an event to turn the *item name* trigger off.

Finally go to that item that you want to do all these actions and have it set the trigger that you made in the first step, on. Then V'alle you are finished!


*Contact me if you have any problems*
~Banned~

Marlune

Thanks a ton Naphe! And thanks to you guys too!That little tutorial also solved my character transformation problems, summoning problems, and pet calling problems! ;D  :D ;D
Current Project: FuRPG
Progress:||||||||||
Mappers:Nicholas, Odin
Eventer:BPKS0

Blizzard

#6
About that message calling thing at the end: In the normal RMXP, when you try to escape a fight and you failed, you also don´t get any message. I think it´s rather self explainable that it failed if you´re still in the fight.

P.S. Common event, not Comment event.

And BTW, I also gave "tutorialistic" answers earlier, but most people after that asked again anyway. So I just thought I´d save my time of writing and his/her time of reading while just posting short, straight, simple and correct answers. After a months here, you will do the same. And to be honest even I don´t understand what exactly your instructions will do. I´d say too much work about something simple. (Just like making a script for letting the dead characters have 1 HP after the end of a battle... >_> )

(I´m a guy.)
Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.



Get DropBox, the best free file syncing service there is!