Jump to content
Ibragim A

get mortar classname if his backpack classname is known or vice versa

Recommended Posts

Hi. I got the following problem. I cannot figure out how to get the classnames of the backpacks through a ingame script, if only the classname of the mortar is known. Or vice versa - how to find out the classname of the mortar, if only the classnames of the two backpacks are known. I did not find these names in the configuration viewer.
Example:
I have "I_G_Mortar_01_F" then get "I_Mortar_01_weapon_F" and "I_Mortar_01_support_F"

Or I have "I_Mortar_01_weapon_F" and "I_Mortar_01_support_F" but get "I_G_Mortar_01_F" as a result.

I need to make such function or script.
Thanks.

Share this post


Link to post
Share on other sites

@Ibragim A, this code,

getArray (configfile >> "CfgVehicles" >> "I_G_Mortar_01_F" >> "assembleInfo" >> "dissasembleTo");

returns

["B_Mortar_01_weapon_F", "B_Mortar_01_support_F"]

This code,

getText (configfile >> "CfgVehicles" >> "I_Mortar_01_weapon_F" >> "assembleInfo" >> "assembleTo");

returns

"I_G_Mortar_01_F"

Unfortunately, for I_Mortar_01_support_F assembleTo property is empty.

  • Like 1

Share this post


Link to post
Share on other sites
9 minutes ago, Schatten said:

@Ibragim A, this code,


getArray (configfile >> "CfgVehicles" >> "I_G_Mortar_01_F" >> "assembleInfo" >> "dissasembleTo");

returns


["B_Mortar_01_weapon_F", "B_Mortar_01_support_F"]

This code,


getText (configfile >> "CfgVehicles" >> "I_Mortar_01_weapon_F" >> "assembleInfo" >> "assembleTo");

returns


"I_G_Mortar_01_F"

Unfortunately, for I_Mortar_01_support_F assembleTo property is empty.

Thanks! Exactly what I need.

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

×