Hi
Let me explain, I'm trying to change the battle system of my game.
My actors begin battle with 1 tp and every action costs 1 tp.
actors gain 1tp every turn.
if a actor wait or use specific abilities, he uses 0tp so, next turn, he would have 2tp. (Max tp is 4)
Anyway, I created an instant skill command called Berserk that active a state to the caster (+100% time action).
After using it, if the actor has more than 2tp, it gives the possibility to use Berserk 2 which has the same effect.
So I need the caster id to check his tp.
I tried to put
$game_variables[50] = a.id;
in the damage formula but it always results 0, That's a first problem.
Next, the command "Berserk" activate a common event :
$game_variables[51] = $game_actors($game_variables[50]).tp;
if $game_variables[51] > 2
hide_actor_command($game_variables[50], "use_skill", 42) *42 is berserk id*
show_actor_command($game_variables[51], "use_skill", 43) *43 is berserk 2 id*
Else
disable_actor_command($game_variables[50], "use_skill", 42)
But when I use the spell, after the damage dealt, the combat stop and show "game_variables is not defined"
It's been a week I'm trying to fix it but I can't find anything that works on forums.
Let me explain, I'm trying to change the battle system of my game.
My actors begin battle with 1 tp and every action costs 1 tp.
actors gain 1tp every turn.
if a actor wait or use specific abilities, he uses 0tp so, next turn, he would have 2tp. (Max tp is 4)
Anyway, I created an instant skill command called Berserk that active a state to the caster (+100% time action).
After using it, if the actor has more than 2tp, it gives the possibility to use Berserk 2 which has the same effect.
So I need the caster id to check his tp.
I tried to put
$game_variables[50] = a.id;
in the damage formula but it always results 0, That's a first problem.
Next, the command "Berserk" activate a common event :
$game_variables[51] = $game_actors($game_variables[50]).tp;
if $game_variables[51] > 2
hide_actor_command($game_variables[50], "use_skill", 42) *42 is berserk id*
show_actor_command($game_variables[51], "use_skill", 43) *43 is berserk 2 id*
Else
disable_actor_command($game_variables[50], "use_skill", 42)
But when I use the spell, after the damage dealt, the combat stop and show "game_variables is not defined"
It's been a week I'm trying to fix it but I can't find anything that works on forums.