Jump to content

Recommended Posts

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
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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×