sarogahtyp 1105 Posted May 12, 2016 Hey guys! In the wiki entry of setIdentity is described how to create an identity in description.ext and set it by its classname. here is the description.ext example of those wiki entry: class CfgIdentities { class MyLittleSoldier { name = "Givens"; nameSound = "Givens"; face="WhiteHead_06"; glasses="None"; speaker="Male05ENG"; pitch=1.1; }; }; if u have that in ur description.ext then u can set a units identity with: _soldier1 setIdentity "MyLittleSoldier"; I m working on a script which deletes units and spawns them at a later time. therefor i need to get the identity classname ("MyLittleSoldier" in the above example) directly from the unit. Idk how to get it. Any help is appreciated... Share this post Link to post Share on other sites
doomnet 23 Posted May 12, 2016 this is not an answer for your question but just to point out it should not be like this ? this setIdentity "MyLittleSoldier"; Share this post Link to post Share on other sites
sarogahtyp 1105 Posted May 12, 2016 this is not an answer for your question but just to point out it should not be like this: _soldier1 setIdentity "MyLittleSoldier"; but like this this setIdentity "MyLittleSoldier"; that depends from where u use it. in units init line it would be this but in a script u use a local variable name like _soldier1 1 Share this post Link to post Share on other sites
doomnet 23 Posted May 12, 2016 Is this something like that you need ? getDescription unit https://community.bistudio.com/wiki/getDescription i don't know just trying to help Share this post Link to post Share on other sites
sarogahtyp 1105 Posted May 12, 2016 Is this something like that you need ? getDescription unit https://community.bistudio.com/wiki/getDescription i don't know just trying to help sadly its not helping because I need the sub-classname from the description.ext, not a classname for an object. but I think i ve found a starting point: BIS_fnc_getCfgIsClass BIS_fnc_getCfgSubClasses this function returns an array of sub classes from description.ext i guess its used like this (plz correct me if i m wrong): if(["CfgIdentities"] call Bis_fnc_getCfgIsClass) then { _subclasses = ["CfgIdentities"] call Bis_fnc_getCfgSubClasses; } else { hint "there is no class for identities in description.ext"; }; now I should have all classnames needed for setIdentity but idk how to get known which identity is currently used by a unit.I need that info to store it before deleting and use it in setIdentity after spawning unit again. (just a reminder :-) 1 Share this post Link to post Share on other sites
Larrow 2801 Posted May 12, 2016 If your spawning the units and using setIdentity on them just save the classname used in a variable on the unit. _identity = "MyLittleSoldier"; _solider setIdentity _identity; _soldier setVariable [ "identity", _identity ];If not, and all your identities reside in description.ext then you could find them by the units Name. _identity = { if ( getText( _x >> "Name" ) isEqualTo ( name _soldier ) ) exitWith { configName _x }; }forEach ( "true" configClasses( missionConfigFile >> "CfgIdentities" )); 1 Share this post Link to post Share on other sites
sarogahtyp 1105 Posted May 13, 2016 _identity = { if ( getText( _x >> "Name" ) isEqualTo ( name _soldier ) ) exitWith { configName _x }; }forEach ( "true" configClasses( missionConfigFile >> "CfgIdentities" )); thx a lot. I think thats exactly what I need Share this post Link to post Share on other sites