RPG Maker Forums

Hey there gang. I have been trying to fix this for a while but I am not a coder so I am a little lost. I feel like I am on the right track but I haven't been able to correct the issue.

I have a bow and arrow system where you put the arrows in your offhand slot as a weapon. When you use the bows attack it fires an arrow and removes 1 from your inventory. The problem comes when there is only 1 arrow left, the one equipped to the offhand.

What I have been able to determine is the Yanflys Skills cost Items plugin is not checking the equipped slots and removing the item from there, if there is one. When your turn comes up, if you only have the equipped arrow left, the skill will be greyed out.

What I was hoping is if someone could adjust the script to allow it to check for and remove items that are equipped. I found this in a post here from Shaz:

JavaScript:
    case 9:  // Weapon

        result = $gameParty.hasItem($dataWeapons[this._params[1]], this._params[2]);

        break;
parameter 1 is the weapon, parameter 2 is whether you want to also look for equipped stuff.

I searched Yanflys plugin for $dataWeapons and found a few locations to which I tried to add, this._params[2] This has allowed me to see that there is an equipped arrow but it does not remove the arrow, and I believe it is throwing an error but I can't seem to get my console to display it.

I would love if anyone could help with this, I'll post a link to the script below, but it's a paid plugin now so if you need me to post any sections please let me know.

Plugin

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,051
Messages
1,018,549
Members
137,836
Latest member
T62352536256t362
Top