Ok, so I'm trying to create an attack where the boss fires off 6 attacks, randomly assigned.
Can't hit dead people.
[Although, no one dies until after the attack, which is kind of a breather.]
I'm using a common event to pick a number between 1 and 4 and if a character is dead at the processing of the event, to exclude them.
This much works. I can reliably generate a random 1-4 and have it exclude results.
And even failing that, I have another event that simply sets the variable random between 1 and 4.
Problem is, no matter the way try to work this, it keeps flopping.
Here's the current action sequence.
In the if statements, I've used =, == and ===. None work. [At this point, I'm throwing code at the wall and seeing if something will stick]
Originally I was getting it hit one or 2 targets but only ever fired off 3 charges, despite there being 6 possibles. [AND it only ever hit actors in slot 2 or 3, even defying the value from the event (no way it was returning 2 or 3 that often)]
Swapped it to "all enemies", and it suddenly clobbered ONE target 6 times in addition to one swipe to the whole party.
Moved the target action to whole action, nothing changed, unless it was scope all targets, where no exceptions, it thwacked the whole party 6 times.
<target action>
hide Battle Hud
tint screen: -255, -255, -255, 255, 30
opacity all members: 0, 30
wait for opacity
action common event
wait: 1
if $gameVariables.value(45)==1
action effect: opponent 1
animation 16: opponent 1
else if $gameVariables.value(45)==2
action effect: opponent 2
animation 16: opponent 2
else if $gameVariables.value(45)==3
action effect: opponent 3
animation 16: opponent 3
else if $gameVariables.value(45)==4
action effect: opponent 4
animation 16: opponent 4
end
wait for animation
action common event
wait: 1
if $gameVariables.value(45)==1
action effect: opponent 1
animation 16: opponent 1
else if $gameVariables.value(45)==2
action effect: opponent 2
animation 16: opponent 2
else if $gameVariables.value(45)==3
action effect: opponent 3
animation 16: opponent 3
else if $gameVariables.value(45)==4
action effect: opponent 4
animation 16: opponent 4
end
wait for animation
action common event
wait: 1
if $gameVariables.value(45)==1
action effect: opponent 1
animation 16: opponent 1
else if $gameVariables.value(45)==2
action effect: opponent 2
animation 16: opponent 2
else if $gameVariables.value(45)==3
action effect: opponent 3
animation 16: opponent 3
else if $gameVariables.value(45)==4
action effect: opponent 4
animation 16: opponent 4
end
wait for animation
action common event
wait: 1
if $gameVariables.value(45)==1
action effect: opponent 1
animation 16: opponent 1
else if $gameVariables.value(45)==2
action effect: opponent 2
animation 16: opponent 2
else if $gameVariables.value(45)==3
action effect: opponent 3
animation 16: opponent 3
else if $gameVariables.value(45)==4
action effect: opponent 4
animation 16: opponent 4
end
wait for animation
action common event
wait: 1
if $gameVariables.value(45)==1
action effect: opponent 1
animation 16: opponent 1
else if $gameVariables.value(45)==2
action effect: opponent 2
animation 16: opponent 2
else if $gameVariables.value(45)==3
action effect: opponent 3
animation 16: opponent 3
else if $gameVariables.value(45)==4
action effect: opponent 4
animation 16: opponent 4
end
wait for animation
action common event
wait: 1
if $gameVariables.value(45)==1
action effect: opponent 1
animation 16: opponent 1
else if $gameVariables.value(45)==2
action effect: opponent 2
animation 16: opponent 2
else if $gameVariables.value(45)==3
action effect: opponent 3
animation 16: opponent 3
else if $gameVariables.value(45)==4
action effect: opponent 4
animation 16: opponent 4
end
wait for animation
</target action>
<follow action>
tint screen: normal, 30
opacity all members: 100%, 30
show battle Hud
wait for opacity
</follow action>
Can't hit dead people.
[Although, no one dies until after the attack, which is kind of a breather.]
I'm using a common event to pick a number between 1 and 4 and if a character is dead at the processing of the event, to exclude them.
This much works. I can reliably generate a random 1-4 and have it exclude results.
And even failing that, I have another event that simply sets the variable random between 1 and 4.
Problem is, no matter the way try to work this, it keeps flopping.
Here's the current action sequence.
In the if statements, I've used =, == and ===. None work. [At this point, I'm throwing code at the wall and seeing if something will stick]
Originally I was getting it hit one or 2 targets but only ever fired off 3 charges, despite there being 6 possibles. [AND it only ever hit actors in slot 2 or 3, even defying the value from the event (no way it was returning 2 or 3 that often)]
Swapped it to "all enemies", and it suddenly clobbered ONE target 6 times in addition to one swipe to the whole party.
Moved the target action to whole action, nothing changed, unless it was scope all targets, where no exceptions, it thwacked the whole party 6 times.
<target action>
hide Battle Hud
tint screen: -255, -255, -255, 255, 30
opacity all members: 0, 30
wait for opacity
action common event
wait: 1
if $gameVariables.value(45)==1
action effect: opponent 1
animation 16: opponent 1
else if $gameVariables.value(45)==2
action effect: opponent 2
animation 16: opponent 2
else if $gameVariables.value(45)==3
action effect: opponent 3
animation 16: opponent 3
else if $gameVariables.value(45)==4
action effect: opponent 4
animation 16: opponent 4
end
wait for animation
action common event
wait: 1
if $gameVariables.value(45)==1
action effect: opponent 1
animation 16: opponent 1
else if $gameVariables.value(45)==2
action effect: opponent 2
animation 16: opponent 2
else if $gameVariables.value(45)==3
action effect: opponent 3
animation 16: opponent 3
else if $gameVariables.value(45)==4
action effect: opponent 4
animation 16: opponent 4
end
wait for animation
action common event
wait: 1
if $gameVariables.value(45)==1
action effect: opponent 1
animation 16: opponent 1
else if $gameVariables.value(45)==2
action effect: opponent 2
animation 16: opponent 2
else if $gameVariables.value(45)==3
action effect: opponent 3
animation 16: opponent 3
else if $gameVariables.value(45)==4
action effect: opponent 4
animation 16: opponent 4
end
wait for animation
action common event
wait: 1
if $gameVariables.value(45)==1
action effect: opponent 1
animation 16: opponent 1
else if $gameVariables.value(45)==2
action effect: opponent 2
animation 16: opponent 2
else if $gameVariables.value(45)==3
action effect: opponent 3
animation 16: opponent 3
else if $gameVariables.value(45)==4
action effect: opponent 4
animation 16: opponent 4
end
wait for animation
action common event
wait: 1
if $gameVariables.value(45)==1
action effect: opponent 1
animation 16: opponent 1
else if $gameVariables.value(45)==2
action effect: opponent 2
animation 16: opponent 2
else if $gameVariables.value(45)==3
action effect: opponent 3
animation 16: opponent 3
else if $gameVariables.value(45)==4
action effect: opponent 4
animation 16: opponent 4
end
wait for animation
action common event
wait: 1
if $gameVariables.value(45)==1
action effect: opponent 1
animation 16: opponent 1
else if $gameVariables.value(45)==2
action effect: opponent 2
animation 16: opponent 2
else if $gameVariables.value(45)==3
action effect: opponent 3
animation 16: opponent 3
else if $gameVariables.value(45)==4
action effect: opponent 4
animation 16: opponent 4
end
wait for animation
</target action>
<follow action>
tint screen: normal, 30
opacity all members: 100%, 30
show battle Hud
wait for opacity
</follow action>