GregRUS 10 Posted April 1, 2011 Is there a players list array command? like list players or list west... ? Share this post Link to post Share on other sites
neokika 62 Posted April 1, 2011 Hi, see playableUnits, seems to be what you're looking for. _neo_ Share this post Link to post Share on other sites
GregRUS 10 Posted April 1, 2011 Thats it! Thank you! ) Share this post Link to post Share on other sites
demonized 20 Posted April 1, 2011 just note that playableUnits will be all units that are playable, not all units that is players. if you have 10 playable units, command will return them even if you have only 5 players active. Share this post Link to post Share on other sites
shuko 59 Posted April 1, 2011 And that it doesn't work in the single player editor. It will always be an empty array. To ease testing you can do this in init.sqf: if !ismultiplayer then { playableunits = switchableunits }; Share this post Link to post Share on other sites
.kju 3239 Posted April 1, 2011 @ Shuko argh dont overwrite BI sqf commands.. Instead do something like this: //init.sqf if (isNil "paramsArray") then { AAS_EditorModeSP = true; }; //any script if (AAS_EditorModeSP) then { MyTag_PlayableUnits = switchableUnits; } else { MyTag_PlayableUnits = playableUnits; }; Share this post Link to post Share on other sites
shuko 59 Posted April 1, 2011 Overwriting works fine. Simple and helps test MP scripts in SP editor without hassle. Write scripts using playableunits, use above code for testing, delete for release (isn't even necessary). No need for double entry when there is a list already. Share this post Link to post Share on other sites
.kju 3239 Posted April 1, 2011 Other people's can will rely on SQF commands to work correctly. There is no good reason to break the scripting engine. Share this post Link to post Share on other sites
shuko 59 Posted April 2, 2011 I'm sure you can give us an example how this breaks something. Share this post Link to post Share on other sites