For reference, the card text for both cards
Dengar pilot ability:
"Once per round after defending, if the attacker is inside your firing arc, you may perform an attack against that ship."
R5-P8:
"Once per round, after defending, you may roll 1 attack die. On a hit result, the attacker suffers 1 damage. On a critical hit result, you and the attacker each suffer 1 damage."
The question is, after Dengar is attacked, can he do both his ability and R5-P8's ability? I thought he could do both, as they are both triggered at the same time (after defending), so I could choose which order to resolve them. After I did my attack with dengar my opponent said I couldn't use R5-P8's ability, since the timing window had now shifted to after Dengar attacked.