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

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
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)}
 
Last edited by a moderator:

Little Paw

Veteran
Veteran
Joined
May 5, 2013
Messages
707
Reaction score
294
First Language
English
Primarily Uses
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...
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Basically it was checking whether "1 == Death State", rather than checking whether "1 == ID of Death State"
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
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... :)
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,575
Latest member
akekaphol101
Top