I'm trying to make a triple attack that hits three random enemies with a teleport to and from the enemies. I've got it mostly down however I want the user to teleport to all three targets before going home. as it is he teleports to the enemy, home, enemy, home, enemy, home; instead of enemy, enemy, enemy, home. the other thing I would like is to have it so the enemies don't disappear if killed until the entire attack is finished, currently there is a chance of killing an enemy and then coming back for a second attack and just hitting empty space. any help would be greatly appreciated!
<setup action>
display action
immortal: targets, true
</setup action>
<target action>
opacity user: 0%, 10
wait for opacity
move user: target, front, 5
wait for movement
opacity user: 100%, 10
wait for opacity
motion attack: user
action animation
wait for animation
action effect
immortal: target, false
opacity user: 0%, 10
wait for opacity
move user: home, 10
wait for movement
opacity user: 100%, 10
face user: forward
wait for opacity
wait for animation
wait for movement
</target action>
<setup action>
display action
immortal: targets, true
</setup action>
<target action>
opacity user: 0%, 10
wait for opacity
move user: target, front, 5
wait for movement
opacity user: 100%, 10
wait for opacity
motion attack: user
action animation
wait for animation
action effect
immortal: target, false
opacity user: 0%, 10
wait for opacity
move user: home, 10
wait for movement
opacity user: 100%, 10
face user: forward
wait for opacity
wait for animation
wait for movement
</target action>