I've been running into several problems as of late trying to get my Tactical Movement system to work.
With a lot of help, I'm now able to set the Actor IDs to a variable based on what location they are in the formation.
However, if you try to reference a formation slot that does not exist, the game crashes (no method for nil:NilClass exception)
so, what I've been working on for quite a few hours now (with no success) is to determine the current party size and set THAT to a variable, using it to make sure the game isn't trying to reference a formation index that (apparently) doesn't exist.
unfortunately, I can't seem to find anything that I can use that can check it without crashing.
I've tried:
$game_party.all_members[x].id
$game_party.all_members[x].size
$game_party.all_members[x].index
$game_party.id
$game_party.size
$game_party.index
$members[x].id
$members[x].size
$members[x].index
$members.id
$members.size
$members.index
I even tried this:
$if game_party.all_members[1].id exists
and
$if game_party.all_members[1].exists
but it says that 'exists' is undefined.
----------
I also tried these:
$game_variables[1051] = $game_party.size
$game_variables[1051] = $game_party.index
$game_variables[1051] = $members.index
$game_variables[1051] = $members.size
so yeah, I've tried everything I know of. Anyone know of some code I could use to set the current number of actors in the party to a variable?