[Resolved] Regarding Ryex's Unleash Skill Script

Started by Wraith89, November 18, 2014, 07:45:19 pm

Previous topic - Next topic

Wraith89

November 18, 2014, 07:45:19 pm Last Edit: November 18, 2014, 08:51:13 pm by Wraith89
While the script works perfectly, is there any way to make it so that a character without weapon does not automatically crash the game? I have tried methods such as adding unless statements where actor's weapon is nil, but that was to no avail and it gives me "cannot convert to integer" error or something.

Thank you.

KK20

November 18, 2014, 08:35:36 pm #1 Last Edit: November 18, 2014, 08:42:54 pm by KK20
Line 86:

unless @active_battler.weapon_id == 0 || $data_weapons[@active_battler.weapon_id].unleash_chance(@active_battler.weapon_id) == false

I'll actually fix that up for him.

EDIT: Main post updated.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Wraith89

Thanks a lot! So || is an indicator of "or" instead of "and" for something to work?

KK20

Uh...I'm going to say yes.

You can replace || with 'or' if you want to. Just remember that && and || have a higher priority level than 'and' and 'or'. And by priority level I mean like how you multiply numbers first before you add/subtract them in an equation.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Wraith89

So it is simply order of operation differences. That clears up a lot of things. Thank you very much!