what i want is a skill that will let me select (not random) multiple enemies but also not let me select the same unit twice.
i have zero coding experience and yanfly produces a script for a chain lightning spell that's the closest I could find:
<Custom Target Eval>
// Adds the selected target to the target list.
targets.push(target);
// Grab the group of alive foes as candidates.
var members = foes.aliveMembers();
// Remove the target from the group of candidates.
members.splice(members.indexOf(target), 1);
// This is the number of extra targets to select with Chain Lightning.
var extraTargets = 3;
// Loop the extra targets.
while (extraTargets--) {
// Grab a random foe from the alive foes.
var member = members[Math.floor(Math.random() * members.length)];
// Check to see if the member exists.
if (member) {
// Add the member to the group of targets.
targets.push(member);
// Remove the member as a viable candidate.
members.splice(members.indexOf(member), 1);
}
}
</Custom Target Eval>
the problem is that it selects random targets after the first and doesn't let me pick them individually. it does however not hit the same target twice which is part of what i want.
does anyone know the correct code for this.. i cant be far off.
im using a series of yanfly plugins, row formation, target core, etc.
but if someone just knows a simpler way of accomplishing what im trying to do please let me know! i have zero coding experience.
thanks!
i have zero coding experience and yanfly produces a script for a chain lightning spell that's the closest I could find:
<Custom Target Eval>
// Adds the selected target to the target list.
targets.push(target);
// Grab the group of alive foes as candidates.
var members = foes.aliveMembers();
// Remove the target from the group of candidates.
members.splice(members.indexOf(target), 1);
// This is the number of extra targets to select with Chain Lightning.
var extraTargets = 3;
// Loop the extra targets.
while (extraTargets--) {
// Grab a random foe from the alive foes.
var member = members[Math.floor(Math.random() * members.length)];
// Check to see if the member exists.
if (member) {
// Add the member to the group of targets.
targets.push(member);
// Remove the member as a viable candidate.
members.splice(members.indexOf(member), 1);
}
}
</Custom Target Eval>
the problem is that it selects random targets after the first and doesn't let me pick them individually. it does however not hit the same target twice which is part of what i want.
does anyone know the correct code for this.. i cant be far off.
im using a series of yanfly plugins, row formation, target core, etc.
but if someone just knows a simpler way of accomplishing what im trying to do please let me know! i have zero coding experience.
thanks!