Jump to content
Sign in to follow this  
mia389

iskindof question

Recommended Posts

I am trying to change part of a script. This is the part I am trying to change

if (_x iskindof "AIR") then {

I am trying to put only certain air vehicles. Like this

if (_x iskindof "A10_US_EP1") then {

The above worked, but not when I put multiple class names in.

I tried these

if (_x iskindof ["A10_US_EP1","ACE_AH6J_DAGR_FLIR"]) then {

and

if (_x iskindof "A10_US_EP1","ACE_AH6J_DAGR_FLIR") then {

neither worked. Do I need to use something different than iskindof?

Share this post


Link to post
Share on other sites

if ((typeOf _x) in ["A10_US_EP1","ACE_AH6J_DAGR_FLIR"]) then {

Note that the check is case-sensitive.

Share this post


Link to post
Share on other sites

Thanks so much guys! Clayman if you didnt have example telling me it was case-sensitive i would of trying forerver lol

Share this post


Link to post
Share on other sites
Clayman if you didnt have example telling me it was case-sensitive i would of trying forerver lol

Try squint. It will remind you every time it stumbles upon some string in array trick. :D

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
Sign in to follow this  

×