To get the actors that are currently in the party you use:
Where "id" is a number from 0-3 based on which caracter in the party you want to do something with.
0 - First partymember
1 - Second partymember
2 - Third partymember
3 - Fourth partymember
So if you want to make a 'SUM' of all the partymembers strenght you do something like this:
PARTY_STRENGHT = ($game_party.actors[0].str +
$game_party.actors[1].str +
$game_party.actors[2].str +
$game_party.actors[3].str
)
or
PARTY_STRENGHT = ($game_party.actors[0].str + $game_party.actors[1].str + $game_party.actors[2].str + $game_party.actors[3].str)
and the same goes for dex, agi, int:
$game_party.actors.dex
$game_party.actors.agi
$game_party.actors.int
But you should also know that if you add the str of $game_party.actors[2].str (the third party member), in the PARTY_STRENGHT and there is no third party member it will give you an error. So if you want to remove the possibility of that error you can do something like this:
if $game_party.actors.size == 1
PARTY_STRENGHT = $game_party.actors[0].str
elsif $game_party.actors.size == 2
PARTY_STRENGHT = ($game_party.actors[0].str +
$game_party.actors[1].str
)
elsif $game_party.actors.size == 3
PARTY_STRENGHT = ($game_party.actors[0].str +
$game_party.actors[1].str +
$game_party.actors[2].str
)
elsif $game_party.actors.size == 4
PARTY_STRENGHT = ($game_party.actors[0].str +
$game_party.actors[1].str +
$game_party.actors[2].str +
$game_party.actors[3].str
)
end
And if you want to check the 'SUM' of all the party member strength you can make an if statement like this:
if PARTY_STRENGHT == 56 #if the sum of all actors strenght equals 56
#Then something happens
end
you can also use these in the if statement:
< # if the sum of all actors strength is below the 'value'
<= # if the sum of all actors strength is below or equal the 'value'
> # if the sum of all actors strength is above the 'value'
>= # if the sum of all actors strength is above or equal the 'value'
I hope that helped.
If you have any furhter questions just ask! :thumb:
Over and out - Gando