Is it possible to restrict a skill's usage if another actor is incapable of acting?

That's because `states` is not an array of numbers.

I copied what Engr wrote because I assumed the logic was correct since he pays a lot more attention to details than I do and properly tests his stuff before throwing it up in public.

Code:
!$game_party.battle_members[0].states.any?{|state| [1,28,29].include?(state.id)} && !$game_party.battle_members[1].states.any?{|state| [1,28,29].include?(state.id)}
That's because `states` is not an array of numbers.

I copied what Engr wrote because I assumed the logic was correct since he pays a lot more attention to details than I do and properly tests his stuff before throwing it up in public.

!$game_party.battle_members[0].states.any?{|state| [1,28,29].include?(state.id)} && !$game_party.battle_members[1].states.any?{|state| [1,28,29].include?(state.id)}
Okay. NOW it works. Thanks. Dunno what the problem was before...
Basically it was checking whether "1 == Death State", rather than checking whether "1 == ID of Death State"
Oh... I see... that was the problem, I forgot about that... and yeah I forgot that members start at 0... XD...


PS: If I post it during weekdays, on the same day you asked, it's safe to assume that I haven't tested it since weekdays is office days... 🙂

Original thread: https://forums.rpgmakerweb.com/threads/is-it-possible-to-restrict-a-skills-usage-if-another-actor-is-incapable-of-acting.21887/