I want to have a skill that forces party members to attack IF they have a certain status effect on them. (like stieners charge from ff9 (but with a state))
I have it working somewhat, but the script does not wait for the attack to end before running the rest of the script.
So what ends up happing is only the last eligible party member attacks.
(script is in the follow up action)
```
```
and the common event is.
```
I have it working somewhat, but the script does not wait for the attack to end before running the rest of the script.
So what ends up happing is only the last eligible party member attacks.
(script is in the follow up action)
```
JavaScript:
<Counter Name: Counter>
[SIZE=12px] <setup action>
clear battle log
display action
immortal: targets, true
perform start
wait for movement
cast animation
wait for animation
</setup action>
<whole action>
</whole action>
<target action>
wait: 6
motion attack: user
wait: 6
action animation: target
animation wait: 6
shake screen: 7, 6, 35
wait for animation
action effect
wait for effect
</target action>
<follow action>
CHANGE VARIABLE 1 = 1
ACTION COMMON EVENT
CHANGE VARIABLE 1 = 2
ACTION COMMON EVENT
CHANGE VARIABLE 1 = 3
ACTION COMMON EVENT
</follow action>
<finish action>
immortal: targets, false
wait for new line
clear battle log
perform finish
wait for movement
wait for effect[/SIZE]
</finish action>
and the common event is.
```
JavaScript:
$gameTemp._actorId = $gameVariables.value(1)
console.log($gameTemp._actorId);
if($gameParty.battleMembers().contains($gameActors.actor($gameParty.battleMembers()[$gameTemp._actorId-1].actorId()))&& $gameParty.battleMembers()[$gameTemp._actorId-1]._passiveStatesRaw.includes(26))
{
//$gameActors.actor(2).forceAction(46, 1);
//BattleManager.forceAction($gameActors.actor(2));
$gameActors.actor($gameTemp._actorId).forceAction(1, 1);
BattleManager.forceAction($gameActors.actor($gameTemp._actorId));
}