On Attack
From SWU Holocron
Rulings for trigger On Attack
Q: If an "On Attack" ability defeats the only opposing Sentinel defender, can I now attack the base?
Examples: Darth Vader, Dark Lord of the Sith, On Attack, Sentinel
A: No, you must declare your target of attack first. Since the Sentinel requires you to choose it as the defender, if the "On Attack" ability defeats your declared target, it is no longer valid and the attack is ineffective.