Jump to content
commanderx

All class names of a specific faction and a specific kind?

Recommended Posts

Hi,

 

I would like to have a fast solution for getting all the classnames out of the Cfg_Vehicles

Something like give me all class names of all men which are from faction Civil or all Cars from faction XY.

I dont have a clue how to do that.

Share this post


Link to post
Share on other sites

For car:

MyVehArray = ("(configname _x iskindOf 'car') && (gettext (_x >> 'faction') == 'CIV_F' or gettext (_x >> 'faction') == 'CIV_IDAP_F' )" configClasses (configfile >> "CfgVehicles")) apply {configName _x};

 

Replace 'car with 'CAManBase' for men.

You can use any faction of your existing classes inside your cfgFactionClasses in your viewer.

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

I found this topic on a search and would like to know where and how to use the line. In the editor? The config viewer? A trigger? I have no idea how to apply that

On 11/27/2017 at 5:37 PM, pierremgi said:

For car:

MyVehArray = ("(configname _x iskindOf 'car') && (gettext (_x >> 'faction') == 'CIV_F' or gettext (_x >> 'faction') == 'CIV_IDAP_F' )" configClasses (configfile >> "CfgVehicles")) apply {configName _x}; 

 

Replace 'car with 'CAManBase' for men.

You can use any faction of your existing classes inside your cfgFactionClasses in your viewer.

 

Share this post


Link to post
Share on other sites
22 hours ago, Theo Thalwitzer said:

I found this topic on a search and would like to know where and how to use the line. In the editor? The config viewer? A trigger? I have no idea how to apply that

 

 

I've no idea when/where you want to apply that also. This code returns an array of vehicle classes (civilian + IDAP), so an array of string. Tell us more about your project if you need more help on forum.

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

×