I need to check if an actor has a specific weapon or armor equipped -- can't use the conditional branch event shortcut because that searches for weapons and armors in inventory as well as equipment.
The script call master list has this but it's not entirely clear to me since I ain't super wise in the ways of code:
if ($gameActors.actor(actorId).equips()[n]) {
return $gameActors.actor(actorId).equips()[n].id;
};
if ($gameActors.actor(actorId).equips()[n]) {
return $gameActors.actor(actorId).equips()[n].name;
};
Would anyone be able to offer an example of how I might specifically be able to check if, say, actor 1 is wielding weapon id 6?
Many thanks!


The script call master list has this but it's not entirely clear to me since I ain't super wise in the ways of code:
if ($gameActors.actor(actorId).equips()[n]) {
return $gameActors.actor(actorId).equips()[n].id;
};
if ($gameActors.actor(actorId).equips()[n]) {
return $gameActors.actor(actorId).equips()[n].name;
};
Would anyone be able to offer an example of how I might specifically be able to check if, say, actor 1 is wielding weapon id 6?
Many thanks!


