I think you can just check to see if the gunner is alive.
This line will wait until there is a gunner in _vehicle (it checks if the gunner is alive - something that isn't there can't be alive)
@alive gunner _vehicle
YOu could also haev the script wait until there is no gunner
@!alive gunner _vehicle
?alive gunner _vehicle:goto "alive"
hint "There is no gunner!"
exit
#alive
hint "There is a gunner!"
exit