Igitur 43 Posted June 22, 2013 Hi, I'd like to simplify a condition line in a script of mine. Basically, I want to replace the precarious weapons lists by a more general Weapon type name that would subsume all the particular classnames. Something like this : if (secondaryWeapon player) isKindOf "Launcher") then {hint 'Yop'}; Unfortunately, isKindOf does not work for weapons. However, base = inheritsFrom (configFile >> "CfgWeapons" >> "Launcher"); hint format ['%1', base]; returns "LauncherCore" (-"PistolCore" or "RifleCore" for pistols or rifles). So the question : is it possible to use that result to identify all types of lauchers, rifles or pistols, and use it in a condition line ? If yes, what should the syntax look like ? Thanks. Share this post Link to post Share on other sites
Deadfast 43 Posted June 22, 2013 (edited) You can use the weapon's type which is a config value that indicates what category the weapon is (primary, secondary, pistol). getNumber(configFile >> "CfgWeapons" >> _weapon >> "type") The possible values can be found here although things might have changed in A3. Edited June 22, 2013 by Deadfast Share this post Link to post Share on other sites
Igitur 43 Posted June 22, 2013 Thanks a lot, I'll try that out. Share this post Link to post Share on other sites
headswe 17 Posted June 22, 2013 I use this, _class = [secondaryWeapon player] call BIS_fnc_classWeapon; _parents = [_class,true] call BIS_fnc_returnParents; if("Launcher_Base_F" in _parents) Share this post Link to post Share on other sites