I'm in the making of a skill that pierces its target and hits a random target in the next row using yanfly's row formation and target core plugins.
Yanfly did make a video on how to make a "Piercing Arrow" ability, which did do what i wanted it to, however all targets are chosen randomly, meaning that if there are several people in the first row, you won't hit your target consistently.
I've tried tinkering with it, and can't find a way to make it target it's original target.
Here's the code he used
<Custom Target Eval>
var row = target.row();
var group = target.friendsUnit();
for (var i = row; i <= Yanfly.Param.RowMaximum; ++i) {
var members = group.rowAliveMembers(i);
if (members.length > 0) {
targets.push(members[Math.floor(Math.random() * members.length)]);
}
}
</Custom Target Eval>
Yanfly did make a video on how to make a "Piercing Arrow" ability, which did do what i wanted it to, however all targets are chosen randomly, meaning that if there are several people in the first row, you won't hit your target consistently.
I've tried tinkering with it, and can't find a way to make it target it's original target.
Here's the code he used
<Custom Target Eval>
var row = target.row();
var group = target.friendsUnit();
for (var i = row; i <= Yanfly.Param.RowMaximum; ++i) {
var members = group.rowAliveMembers(i);
if (members.length > 0) {
targets.push(members[Math.floor(Math.random() * members.length)]);
}
}
</Custom Target Eval>