; A small script that will blowup a vehicle as soon as a specific unit gets into it

; Get the unit which will be affected
_Unit = _this select 0
; Get the vehicle which will be affected
_Vehicle = _this select 1

; Main loop
#Update

; Check is the unit is in the vehicle
? (_Unit in _Vehicle) : goto "BlowUp"

; Wait 2 seconds
~2
goto "Update"

; The unit must be in the vehicle
#BlowUp
; Destroy the vehicle
_Vehicle setdammage 1
exit