- Joined
- Apr 24, 2017
- Messages
- 510
- Reaction score
- 315
- First Language
- English
- Primarily Uses
- RMMV
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:
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
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;
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



