• Topics

  • Posts

    • i've menaged to put togheter this:
        { if ((side _x) == independent) then { if (_x distance2D crew1 < 10) then { [crew1] join _x; }; }; } forEach allUnits; seems to do its work...now i must elaborate a logic and a script to support the whole idea!
    • Here's a new, and much faster version.  Just be aware that this (and all of the earlier ones) mess up formatting within strings.  I'm working on a way to escape strings, and will post back up when I find something reliable.   So if you did this:   {"hello, my name is Mr Stkrdknmibalz. I live in a beautiful house, with my lovely wife and 2 kids"}   Then you get:   {"hello,my name is Mr Stkrdknmibalz.I live in a beautiful house,with my lovely wife and 2 kids"} Anyway, here's the new script (with a couple of diags thrown in to log start and end length):   fnc_whitespace = {     private _noWhitespace = toArray _this;     diag_log format ["char count start: %1", count _noWhitespace];     {         if (0 isEqualType _x) then {             if ([9,13,10] find _x > -1) then {                 _noWhitespace set [_forEachIndex,objNull];             } else {                 if ([34,39,94,42,40,41,123,125,91,93,59,58,62,47,43,45,61,46,44,33] find _x > -1) then {                     scopeName "scope";                     for "_i" from 1 to 100 do {                         if (_forEachIndex - _i > -1) then {                             if ([32,9,13,10] find (_noWhitespace select (_forEachIndex - _i)) > -1) then {                                 _noWhitespace set [_forEachIndex - _i,objNull]                             } else {                                 breakTo "scope"                             }                         }                     };                     for "_i" from 1 to 100 do {                         if (_forEachIndex + _i < count _noWhitespace) then {                             if ([32,9,13,10] find (_noWhitespace select (_forEachIndex + _i)) > -1) then {                                 _noWhitespace set [_forEachIndex + _i,objNull]                             } else {                                 breakTo "scope"                             }                         }                     }                 }             }         };     } forEach _noWhitespace;     _noWhitespace = _noWhitespace - [objNull];     {         if (125 isEqualTo _x) then {             if (59 isEqualTo (_noWhitespace select (_forEachIndex - 1))) then {                 _noWhitespace set [_forEachIndex - 1,objNull]             }         }     } forEach _noWhitespace;     _noWhitespace = _noWhitespace - [objNull];     diag_log format ["char count end: %1", count _noWhitespace];     toString _noWhitespace };  
    • i cant find out how,,,,someone help meh