Hi, I hope I'm posting this in the correct location!
So I'm still new to Javascript, but I'm trying to write a simple check to see if I have a weapon in my inventory. All I can find are things related to checking if I have the item actually equipped or not.
if ($gameActors.actor(1).equips().contains($dataWeapons[50])){ $gameVariables.setValue(271, 61);}else{ $gameVariables.setValue(271), 0);}That's the code that I have, and it works to check and see if I have the weapon in the 50th database slot for weapons is equipped, but that's not quite what I want.
Is there a $gameActors.actor(1).inventory().contains(blahblah) that I can use? I've tried a few variations and I've looked through some of the .js files but I can't find anything. 🙁 Sorry if the answer to this is really obvious and I'm missing something simple.
Edit: I want to check specifically for a weapon in my inventory, not an item.
So I'm still new to Javascript, but I'm trying to write a simple check to see if I have a weapon in my inventory. All I can find are things related to checking if I have the item actually equipped or not.
if ($gameActors.actor(1).equips().contains($dataWeapons[50])){ $gameVariables.setValue(271, 61);}else{ $gameVariables.setValue(271), 0);}That's the code that I have, and it works to check and see if I have the weapon in the 50th database slot for weapons is equipped, but that's not quite what I want.
Is there a $gameActors.actor(1).inventory().contains(blahblah) that I can use? I've tried a few variations and I've looked through some of the .js files but I can't find anything. 🙁 Sorry if the answer to this is really obvious and I'm missing something simple.
Edit: I want to check specifically for a weapon in my inventory, not an item.