Jump to content
Sign in to follow this  
dragon zen

How to search and flite soldiers automaticly??

Recommended Posts

Hello friends:

I have known how to search all existing soldiers in certain mod. But I got a question:

I use following script, but there are still some men which can not create in the mission, they are base type or other thing, can't be created.

So I ask besides _display_name and _mode, which variable should I use to flite soldiers??

Thanks.

_soldierall=configFile >> "CfgVehicles";

for [{_i=0}, {_i<count _soldierall}, {_i=_i+1}] do {

_soldier=_soldierall select _i;

if (isClass _soldier) then

_type=getText(_soldier >> "vehicleclass");

if(_type in ["Men"])then

{

_name=configName(_soldier);

_display_name=getText(_soldier >> "displayName");

_side=getNumber(_soldier >> "side");

_weapons=getArray(_soldier >> "weapons");

_faction=getText(_soldier >> "faction");

_model=getText(_soldier >> "model");

if((_display_name!="")&&(_model!=""))then {XXXXX};

};

};

};

Share this post


Link to post
Share on other sites

Up.

Should I sent this topic to "Config & Script" part?

Share this post


Link to post
Share on other sites

Although I might not be able to help, here is a tip: Use the code tag under the advanced section when pasting code, in order to preserve indents that aid reading. Especially when you have several scopes {}. Even the small section you posted above, I (and probably other) tend to ignore.

Want help? Present the problem properly. Wish we had the code tag available under the quick reply section though.

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  

×