07-02-2014, 10:51 PM
He's clearly asking for a script that returns true when the first enemy of a troop attacks Actor 17. He's ALSO asking for it to be a "battle trigger" in an event, which I am pretty sure is not possible. Events can run at the start of a turn, or skills can call them.
If you can make it work, its
good luck!
If you can make it work, its
Code:
actorAt = -1
for i in 0..$game_party.actors.count
if $game_party.actors[i] == $game_actors[17]
actorAt = i
end
end
return $game_troop.enemies[1].current_action.target_index == actorAt
good luck!