thanks to a helpful member of the forums Ive been provided with a nice bit of code to assign variables in an attack formula..
this assigns the id of the target at the variable number equal to the user.
and this is intended to check on that variable.
when the attack is used I get an error saying
do i need to convert the id to an integer? im having trouble finding the problem
this assigns the id of the target at the variable number equal to the user.
Code:
a.add_state(20);v[(a.index + 1)||(a.enemy_id + 4)]=(b.index+1)||(b.enemy_id+4)
and this is intended to check on that variable.
Code:
def check_state_from_var
return if not state?(20)
id_to_check = self.enemy_id + 4 if enemy?() else self.index
return if not $game_variables[id_to_check].state?(27)
remove_state(20)
add_state(22)
end
when the attack is used I get an error saying
do i need to convert the id to an integer? im having trouble finding the problem