Hello, there was a problem at the common event this time.
I thought that the state given is different depending on the hp situation of the actor.
So I made this code.
[#spoiler]
actor = $game_actors[14]
actor.add_state(142) if (($game_actors[$game_variables[18]].hp/$game_actors
[$game_variable[18]].mhp))*100 >= 20
actor.add_state(143) if (($game_actors[$game_variables[18]].hp/$game_actors
[$game_variables[18]].mhp))*100 <= 20
[#/spoiler]
For variable number 18, the script was used to store the id of the actor targeted by the skill.
So I built and start it, but
The error game_actor can't be coerced by fixnum occurred.
So I subtracted game_variable[18] and tried to put the number (id of the actor to be skill target), but the same error occurred.
Why is it like this?
I thought that the state given is different depending on the hp situation of the actor.
So I made this code.
[#spoiler]
actor = $game_actors[14]
actor.add_state(142) if (($game_actors[$game_variables[18]].hp/$game_actors
[$game_variable[18]].mhp))*100 >= 20
actor.add_state(143) if (($game_actors[$game_variables[18]].hp/$game_actors
[$game_variables[18]].mhp))*100 <= 20
[#/spoiler]
For variable number 18, the script was used to store the id of the actor targeted by the skill.
So I built and start it, but
The error game_actor can't be coerced by fixnum occurred.
So I subtracted game_variable[18] and tried to put the number (id of the actor to be skill target), but the same error occurred.
Why is it like this?