This is on what i am working for.... that suposed to attack the highest hp target... but sometime the enemy attack two time 🙁
BTW how can i creat a spoil?
<Target: 1 Random Foes>
<Custom Target Eval>
if ($gameActors.actor(1).hp > $gameActors.actor(2).hp) {
if ($gameActors.actor(1).hp > $gameActors.actor(3).hp) {
if ($gameActors.actor(1).hp > $gameActors.actor(4).hp) {
var t = 1
}
else {
var t = 4
}
}
else {
if ($gameActors.actor(3).hp > $gameActors.actor(4).hp){
var t = 3
}
else {
var t = 4
}
}
}
else {
if ($gameActors.actor(2).hp > $gameActors.actor(3).hp) {
if ($gameActors.actor(2).hp > $gameActors.actor(4).hp) {
var t = 2
}
else {
var t = 4
}
}
else {
if ($gameActors.actor(3).hp > $gameActors.actor(4).hp) {
var t = 3
}
else {
var t = 4
}
}
}
var member = $gameActors.actor(t);
targets.push(member);
</Custom Target Eval>
BTW how can i creat a spoil?
<Target: 1 Random Foes>
<Custom Target Eval>
if ($gameActors.actor(1).hp > $gameActors.actor(2).hp) {
if ($gameActors.actor(1).hp > $gameActors.actor(3).hp) {
if ($gameActors.actor(1).hp > $gameActors.actor(4).hp) {
var t = 1
}
else {
var t = 4
}
}
else {
if ($gameActors.actor(3).hp > $gameActors.actor(4).hp){
var t = 3
}
else {
var t = 4
}
}
}
else {
if ($gameActors.actor(2).hp > $gameActors.actor(3).hp) {
if ($gameActors.actor(2).hp > $gameActors.actor(4).hp) {
var t = 2
}
else {
var t = 4
}
}
else {
if ($gameActors.actor(3).hp > $gameActors.actor(4).hp) {
var t = 3
}
else {
var t = 4
}
}
}
var member = $gameActors.actor(t);
targets.push(member);
</Custom Target Eval>