RPG Maker Forums

 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?

Latest Threads

Latest Posts

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,047
Messages
1,018,540
Members
137,834
Latest member
EverNoir
Top