Ivanoff.N 61 Posted February 18, 2017 Hi all. I am wondering if it is at all possible to activate a script when unit enters specific class. For example: if ((vehicle player) = "B_Hunter_F") then {hint "Right vehicle"} else {hint "wrong vehicle"}; Is it possible to use classnames instead of particular unit names that will apply to all such vehicles ingame or not ? Share this post Link to post Share on other sites
Greenfist 1863 Posted February 18, 2017 typeOf will give you the class name of the vehicle. Also isKindOf might be useful if there's multiple child classes of the same parent. 1 Share this post Link to post Share on other sites
Ivanoff.N 61 Posted February 18, 2017 1 hour ago, Greenfist said: typeOf will give you the class name of the vehicle. Also isKindOf might be useful if there's multiple child classes of the same parent. Is this the correct syntax then ? _vp = typeof "B_Hunter_F"; if ((vehicle player) = _vp) then {hint "Right vehicle"} else {hint "wrong vehicle"}; Share this post Link to post Share on other sites
killzone_kid 1326 Posted February 18, 2017 check the example on the command page https://community.bistudio.com/wiki/typeOf 1 Share this post Link to post Share on other sites
Ivanoff.N 61 Posted February 18, 2017 25 minutes ago, killzone_kid said: check the example on the command page https://community.bistudio.com/wiki/typeOf I swear that example was not there earlier today, did you just put it there ? Share this post Link to post Share on other sites
serena 150 Posted February 18, 2017 Copy-paste from https://community.bistudio.com/wiki/typeOf if (typeOf vehicle player == "B_Heli_Light_01_armed_F") then {hint "Player is in AH-9 Pawnee"}; Share this post Link to post Share on other sites