The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: MarkDarkness on October 09, 2009, 01:41:08 PM

Title: [RESOLVED] Always Escape
Post by: MarkDarkness on October 09, 2009, 01:41:08 PM
Hey there, all... quick question here.

I'm trying to set up a script or do an edit which enables the party to always escape, 100% chance, unless the "Escape Allowed" script is set to off, of course.

Had no luck so far... anybody can help out?

Thanks,
Title: Re: [REQUEST XP] Always Escape
Post by: Zylos on October 09, 2009, 04:42:49 PM
Is it that you want the party to always escape 100% regardless of agility just anytime you select the escape button, or only able to escape 100% after some sort of set conditions, like a switch being on or a skill being used?
Title: Re: [REQUEST XP] Always Escape
Post by: MarkDarkness on October 10, 2009, 01:34:58 AM
100% escape chance, unconditionally.

Ideally I'd like a variable to control it in percentages, removing the involvement of AGI, but since I didn't find any way to do that, 100% chance will do just fine.
Title: Re: [REQUEST XP] Always Escape
Post by: tidloc on October 12, 2009, 09:13:12 AM
That should be quite short, I'll write ut for you, when I get home from work.
Also with the Percentage of successfull escape shouldn't be a problem.  ;D
Title: Re: [REQUEST XP] Always Escape
Post by: Zylos on October 12, 2009, 04:54:16 PM
Having it always be 100% chance is pretty easy, it's just one line at Scene_Battle 2, line 113. Change it to "success = rand(100) < 50 * 3", and voila, they will always escape if they're allowed to.

OR

If you want it to be percent chance, change that line to "success = rand(100) < $game_variables[5]" with the variable 5 being replaced by the ID of what variable you want to use. It'll select a random number from 0-100, and if that number is lower than your percent variable, you can escape. I hope that's what you meant, anyway.
Title: Re: [REQUEST XP] Always Escape
Post by: MarkDarkness on October 13, 2009, 03:25:10 AM
Thanks a whole lot, guys! :) That really helped.