nark0t1k 16 Posted March 31, 2015 Hi I get some problem to check the Copilot from Humming bird I can use a eventhandle GetIn to check sit use for copilot : Gunner But if i try to check if i'm gunner that doesn't work if(gunner (vehicle player) == player) then {hint "You are the copilot";}; I already use this for pilot and that work well but doesn't find another way than use Eventhandle with getin then check if _this select 2 was "gunner" ... But i need to make this without eventhandle ... Hope you understand and can help :) Share this post Link to post Share on other sites
samatra 85 Posted March 31, 2015 fn_isUnitCopilot = { if(vehicle _this == _this) exitWith {false}; private ["_veh", "_cfg", "_trts", "_return", "_trt"]; _veh = (vehicle _this); _cfg = configFile >> "CfgVehicles" >> typeOf(_veh); _trts = _cfg >> "turrets"; _return = false; for "_i" from 0 to (count _trts - 1) do { _trt = _trts select _i; if(getNumber(_trt >> "iscopilot") == 1) exitWith { _return = (_veh turretUnit [_i] == _this); }; }; _return }; use as player call fn_isUnitCopilot you can check any units too Script is bit simplified and doesn't check for secondary turrets (turret on top of a turret) but since there is no such vehicles that have copilots on such turrets you should be fine with stock Arma 3 content and pretty much any addon. Share this post Link to post Share on other sites
nark0t1k 16 Posted March 31, 2015 Nice thanks :p So fast so good :o Share this post Link to post Share on other sites
inlesco 233 Posted March 31, 2015 Samatra's magic is always welcome! Share this post Link to post Share on other sites