I am working on my game in RPG Maker VX Ace and I can't get the value of something in one of my scripts.
In my game I have a custom screen for when encounters start that displays the enemies that are going to be in the fight. I am able to use $game_troop.members to access the name of their battler sprites, but despite the documentation saying that $game_troop.members should return an array of RPG::Troop::Member objects it seems when I access them I get RPG::Enemy objects. At least that is what I thought because when I print the entire array I get more information.
Printing just one member of the Array:
-------------
Printing the entire array:
-----
What I am trying to do is grab a troop member's @hidden attribute, so that if they are hidden at the start of the battle their image doesn't show up on my battle start screen. The output shows that it can be seen but I don't know how to get to that information because doing $game_troop.members[id_of_member].hidden doesn't exist and crashes the game.
Does anyone know how to get that value in RPG Maker VX Ace?
Sorry if this post is formatted poorly or isn't in the right location. This is my first time using a forum.
In my game I have a custom screen for when encounters start that displays the enemies that are going to be in the fight. I am able to use $game_troop.members to access the name of their battler sprites, but despite the documentation saying that $game_troop.members should return an array of RPG::Troop::Member objects it seems when I access them I get RPG::Enemy objects. At least that is what I thought because when I print the entire array I get more information.
Printing just one member of the Array:
Code:
print $game_troop.members[1]
Code:
#<Game_Enemy:0xf09cc20>
-------------
Printing the entire array:
Code:
print $game_troop.members
Code:
[#<Game_Enemy:0x11ccf11c @battler_name="JoTeeFan", @battler_hue=0, @actions=[], @speed=0, @result=#<Game_ActionResult:0x11ccf0e0 @battler=#<Game_Enemy:0x11ccf11c ...>, @used=false, @missed=false, @evaded=false, @critical=false, @success=false, @hp_damage=0, @mp_damage=0, @tp_damage=0, @hp_drain=0, @mp_drain=0, @added_states=[], @removed_states=[], @added_buffs=[], @added_debuffs=[], @removed_buffs=[]>, @last_target_index=0, @guarding=false, @animation_id=0, @animation_mirror=false, @sprite_effect_type=nil, @tp=0, @mp=9999, @hp=9999, @hidden=false, @param_plus=[0, 0, 0, 0, 0, 0, 0, 0], @states=[], @state_turns={}, @state_steps={}, @buffs=[0, 0, 0, 0, 0, 0, 0, 0], @buff_turns={}, @index=0, @enemy_id=10, @original_name="DUMMY", @letter=" A", @plural=false, @screen_x=212, @screen_y=288>, #<Game_Enemy:0x11ccecd0 @battler_name="JoTeeFan", @battler_hue=0, @actions=[], @speed=0, @result=#<Game_ActionResult:0x11ccec94 @battler=#<Game_Enemy:0x11ccecd0 ...>, @used=false, @missed=false, @evaded=false, @critical=false, @success=false, @hp_damage=0, @mp_damage=0, @tp_damage=0, @hp_drain=0, @mp_drain=0, @added_states=[], @removed_states=[], @added_buffs=[], @added_debuffs=[], @removed_buffs=[]>, @last_target_index=0, @guarding=false, @animation_id=0, @animation_mirror=false, @sprite_effect_type=nil, @tp=0, @mp=9999, @hp=9999, @hidden=true, @param_plus=[0, 0, 0, 0, 0, 0, 0, 0], @states=[], @state_turns={}, @state_steps={}, @buffs=[0, 0, 0, 0, 0, 0, 0, 0], @buff_turns={}, @index=1, @enemy_id=10, @original_name="DUMMY", @letter="", @plural=false, @screen_x=332, @screen_y=288>]
-----
What I am trying to do is grab a troop member's @hidden attribute, so that if they are hidden at the start of the battle their image doesn't show up on my battle start screen. The output shows that it can be seen but I don't know how to get to that information because doing $game_troop.members[id_of_member].hidden doesn't exist and crashes the game.
Does anyone know how to get that value in RPG Maker VX Ace?
Sorry if this post is formatted poorly or isn't in the right location. This is my first time using a forum.