Insert a snippet
Code:
class Game_Battler
attr_reader :state_turns
end
Then you can use it like (pick whichever based on your need)
Code:
$game_actors[id].state_turns[state_id]
$game_party.members[index].state_turns[state_id]
$game_troop.members[index].state_turns[state_id]
Hm awesome!! Just like that?

Does that mean if i write:
attr_reader :[local variable name]
then i can access that local variable the same way?
(state_turns was a local var right?)
That's much better solution compare to this =|
Code:
class Game_Battler
def state_turns(stateId)
@state_turns[stateId]
end
end
Thanks
@TheoAllen . By the way i want to ask another thing.
Is there a script snippet to check for what attributes are available for a specified object?
For example, i want to check what attributes is available for a state object on actor (ex: id)
but the only way i know is to do a Global Search for "state." and it doesn't work very well.