so i asked for a way to make char 1 not show up in battles and was quickly given this script to place in materials
class Game_Party def battle_members all_members[1, max_battle_members].select {|actor| actor.exist? } endendit worked however the character wont show up anywhere else either(ie on maps and such the sprite wont show)
is there a way to fix this? please note i only know a bit of html/c++ code i dont know ruby
Well this script snippet in itself is inherently flawed, and does not solve your issue.
If you switch your party formation, and place a different character in the player 1's position, you end up with the new position 1 blocked out.
However, if you note in $game_player, you'll find:
#-------------------------------------------------------------------------- # * Get Corresponding Actor #-------------------------------------------------------------------------- def actor $game_party.battle_members[0] endAccesses the battle_members array contained within the $game_party object, to retrieve the first position [0] contained within the battle_members return object.
Note back to the function in question here, reducing the return array within the battle_members object, will also reduce the return array received by the $game_player object. Thus you receive character 2 instead of character 1 on the map as well as in battle.
class Game_Party def battle_members(range_start=1) all_members[range_start, max_battle_members].select {|actor| actor.exist? } endendclass Game_Player #-------------------------------------------------------------------------- # * Get Corresponding Actor #-------------------------------------------------------------------------- def actor $game_party.battle_members(0)[0] endendCombination of these two should fix your issue.
Changing the function of battle_members to have an optional input of (range_start = 1) will default the function input to keep current code from breaking, by not requiring a new parenthesis addition, e.g.($game_party.battle_members) will still work, but ($game_party.battle_members(5)) will also work.
It will also solve your issue of encapsulating where you want your party member to be visible, if the game_battlers function is called.
ty so much its working now.
also ty for explaining how it works.(one day might learn ruby just not now)