Hi, I'm trying to use this command below to set the variable 508 to the value of an actors attack.
$gameVariables.setValue(508, $gameActors.actor($gameVariables.value(524)).param[2])
Variable 524 is an index of a loop that goes through all of the actors and if they are in the party sets their attack and other variables to allow them to perform in the tactical battle system I am making.
However, when I try and set the variable to the attack parameter, it returns as 0. The attack power of the first actor is 31.
This same result happens with all parameters but HP.
Is there a problem with my code? Is there another way I can find the attack of actor(x)?
$gameVariables.setValue(508, $gameActors.actor($gameVariables.value(524)).param[2])
Variable 524 is an index of a loop that goes through all of the actors and if they are in the party sets their attack and other variables to allow them to perform in the tactical battle system I am making.
However, when I try and set the variable to the attack parameter, it returns as 0. The attack power of the first actor is 31.
This same result happens with all parameters but HP.
Is there a problem with my code? Is there another way I can find the attack of actor(x)?