Hi. I was wondering if it's possible to make a conditional branch with a script that checks if actor (number x) doesn't have anything equipped in his equipment slots.
In RPG Maker VX, the script looked like this:
$game_actors[1].equips[0].nil?
Can anyone convert this script so it can be used with RPG Maker MV?
That VX script would only tell you if an actor had a weapon equipped. It would not tell you whether any of the armor slots were filled. Is that what you want - by "equipment slots" do you mean "weapon"? Or do you mean ANY equipment?
Just one slot is fine, because I could make other conditional branches to check the rest of slots.
If I'm correct, the first part would be:
$gameActors.actor(1).
What about the rest?
There is trick and i think its useful
it will check every slots
!($gameActors.actor(x).equips()==",,,,")
Thank you!
I also found a script which I can't make to work in a conditional branch. Getting syntax error "Unexpected end of input".
This is the script:
if ($gameActors.actor(Id).equips(SlotID).contains($dataArmors[Id])
What it's supposed to do is to check if a specific armor is equipped in the selected slot. Any help why I'm getting the error?
you forgot ")"
if ($gameActors.actor(Id).equips(SlotID).contains($dataArmors[Id]))
that's how i do it
conditional Branch > Script > $gameActors.actor(1).equips().contains($dataArmors[1])
Okay!
Then what I need to write if I want to check same on ALL actors in party?