Jump to content

Monsada

Member
  • Content Count

    228
  • Joined

  • Last visited

  • Medals

Posts posted by Monsada


  1. Aaaah ok. Well i am using your upsmon not from static missions but they spawn into zones (which are also made on the fly) (mcc).

    I am not realy using the reinforcements because the mission maker simple moves a zone so all the units attached to it go on the move. So we make reinforcements work like that.

    Now to my questions:

    -Apart from reinforcements do units use vehicles if they are empty if they need to cross a large piece of terrain?

    -Vehicles are spawned during mission and in no way will there be a static list with all vehicles available. Do the units scan for possible vehicles all time?

    My best hope would be the AI unit is for any reason to cross a large piece of terrain. it can even be because the zone is 1 by 1 km. At any point they see a usable transport they go use it?

    First I must say that lider cheks for vehicles is he is far away from enemy, that means that u can spawn vehicles in run time. The problem for u is the distance, leader uses next formula for cheking vehicles

    _dist >= ( _closeenough + KRON_UPS_safedist )*1.2) 
    

    the problem then is the distance for comunicating and sharing the enemy, if platoon not know enemy will not check and if is far from sharedist from enemy will not known about them, u can set next parameter to put the distance u need in meters.

    KRON_UPS_sharedist = 1000;
    

    chek it and tell me.


  2. People have already tested to see if things run in parallel by taking 2 scripts that use and change the same variable in a single command, and they never managed to create any artifacts that would happen if the scripts actually did run in true parallel. For example if you run the following script twice (assuming number was set to 0 before spawning the script twice):

    for "_i" from 1 to 10000 do
    {
      number = number + 1;
    };
    

    If the script would actually run in parallel on 2 CPUs then you could have a situation where both scripts would read the same number (say 0) and set it to number+1 (say 1). Then after both scripts finish running you will possibly have number Actually smaller than 20,000.

    However in Arma 2 you will always get 20,000, which means the scripts never run in parallel - at best one script gets interrupted so that the other can run, and never in the middle of a single command. Actual windows threads can get interrupted in the middle of such a command and will be able to cause the issue of the total sum actually ending up as less than 20,000.

    Spawning scripts does do one good thing - it allows you to sleep/wait in one script while another runs and have the engine manage which scripts runs when instead of having to handle it yourself, which is why unrelated scripts should pretty much always be spawned rather than called.

    Great test Galzohar, this means that the only reason for employing spawn functions is when doing sleeps, interesting, is good to know.

    Never will go to bed without learning something.

    Thanks for the info ;)


  3. In spawning with trigger I can not help u, but in patrolling and making support u could try UPSMON. With this u can place stacit platoons, patrol platoons and static or patrol reinforcement platoons, put reinforcements far away in a map with vehicles near, then in your trigger (this that was to make spawn) calls for reinforcement, u could see that Platoons of AI takes vehicles and aproach the objective.

    with UPSMON IA talks each other groups managing to sourround enemy.

    Take a look at this test mision. http://www.megaupload.com/?d=9YRQG24O

    I think is better IA not spawn from air, is much more realistic to see IA aproaching.


  4. I had the same problem and I solve it assigning eachs unit in the correct position, assignasDriver, assignascargo, assignasGunner, and last doing

    [_units] ordergetin;

    ---------- Post added at 03:00 AM ---------- Previous post was at 02:59 AM ----------

    //Movemos el resto como carga

    {

    _x assignAsCargo _vehicle;

    _units = _units - [_x];

    } forEach _units;

    {

    [_x] orderGetIn true;

    } forEach _unitsin - [_driver];


  5. Hi, here I paste a function I create for UPSMON.

    Only u need is to assign any soldier to a position of the vehicle, the function below has three parameters

    _grpid = _this select 0;

    _unitsin = _this select 1;

    _vehicle = _this select 2;

    _grpid: dont mind for u, in UPSMON is for identifying the group in the vehicle

    _unitsin: array of units to get in the vehicle

    _vehicle: vehicle to get in.

    //Funcion que mete la tropa en el vehiculo
    MON_UnitsGetIn = {
    	private["_grpid","_vehicle","_npc","_driver","_gunner", "_unitsin", "_units" , "_Commandercount","_Drivercount","_Gunnercount","_cargo",
    			"_Cargocount","_emptypositions","_Commander","_vehgrpid","_cargo"];	
    
    	_grpid = _this select 0;
    	_unitsin = _this select 1;
    	_vehicle = _this select 2;
    
    	_units = _unitsin;				
    	_driver = objnull;
    	_gunner = objnull;	
    	_Commander	= objnull;
    	_Cargocount = 0;
    	_Gunnercount = 0;
    	_Commandercount = 0;
    	_Drivercount = 0;
    	_cargo = [];
    
    	_Cargocount = (_vehicle) emptyPositions "Cargo";
    	_Gunnercount = (_vehicle) emptyPositions "Gunner"; 
    	_Commandercount = (_vehicle) emptyPositions "Commander"; 
    	_Drivercount = (_vehicle) emptyPositions "Driver"; 	
    
    	_emptypositions = _Cargocount + _Gunnercount + _Commandercount + _Drivercount;		
    
    	//Obtenemos el identificador del vehiculo
    	_vehgrpid = _vehicle getvariable ("your_grpid");
    	_cargo = _vehicle getvariable ("your_cargo");
    	if ( isNil("_vehgrpid") ) then {_vehgrpid = 0;};	
    	if ( isNil("_cargo") ) then {_cargo = [];};			
    
    
    	//Hablitamos a la IA para entrar en el vehiculo		
    	{		
    		unassignVehicle _x;			
    		_x spawn MON_Allowgetin;						
    	}foreach _units;		
    
    	{		
    		if ( _x == leader _x && _Cargocount > 0 ) then
    		{
    			_x assignAsCargo _vehicle;	
    			_units = _units - [_x];
    			[_x] orderGetIn true;	
    		};
    	}foreach _units;	
    
    	//Si el vehiculo pertenece al grupo asignamos posiciones de piloto, sinó solo de carga
    	if ( _vehgrpid == _grpid ) then {
    		//Asignamos el conductor
    		if ( _Drivercount > 0 && count (_units) > 0 ) then { 
    			_driver =  _units  select 0;					
    			[_driver,_vehicle,20] spawn MON_assignasdriver;				
    			_units = _units - [_driver];
    		};
    
    		//Asignamos el artillero
    		if ( _Gunnercount > 0 && count (_units) > 0 ) then { 						
    			_gunner =  _units select 0;
    			_gunner assignAsGunner _vehicle;
    			_units = _units - [_gunner];
    		};
    
    		//Asignamos el comandante
    		if ( _Commandercount > 0 && count (_units) > 0 ) then { 	
    			_Commander =  _units select 0;		
    			_Commander assignAsCommander _vehicle;
    			_units = _units - [_Commander];	
    		};
    
    	};
    
    	//Movemos el resto como carga
    	{			 
    		_x assignAsCargo _vehicle;	
    		_units = _units - [_x];	
    	} forEach _units;  
    
    
    	{			 
    		[_x,0] spawn MON_dostop;
    		[_x] orderGetIn true;	
    	} forEach _unitsin - [_driver]; 	
    
    	_cargo = _cargo - _unitsin; //Para evitar duplicados
    	_cargo = _cargo + _unitsin; //Añadimos a la carga
    	_vehicle setVariable ["your_cargo", _cargo, false];				
    };	

    I had other functions that may be utils for u like looking for nearest vehicles, getout.. u can find it in MON_functions.sqf in UPSMON http://forums.bistudio.com/showthread.php?t=91696


  6. _car addEventHandler ["GetIn", { if ((_this select 1) == "gunner") then {_this execVM "your_script_getin.sqf"}}];
    	_car addEventHandler ["GetOut", {_this Call Compile PreProcessFile "your_script_getout.sqf";}];

    then only u need is putting the addaction in your_script_getin.sqf

    and remove action in your_script_getout.sqf

    the functions will receive an array, check addEventHandler in wiki for more info.

    but I think that is [car,position,x]

    car = vehicle with de eventhandler

    position = position occupied, gunner, driver, cargo..

    x = I dont remember :P


  7. Thanks for the awesome script :0 I use this one now for my MCC (mission generator ). However i would like some more details on the usage of vehicles.

    Under what conditions are vehicles used? I havent seen them do that so i am curious.

    Platoons will use any eart vehicle, if people want I will do the same with helicopters for doing paradrops near objectives.

    For implementing only u need is putting empty vehicles in map, like players IA will use them if enemy is far away, by the distance needed for using vehicles they will use them when called for reinforcement.

    U can see this in the sample mision http://www.megaupload.com/?d=9YRQG24O

    Why Ias get in vehicles?

    When reinforcement is called (KRON_UPS_reinforcement = true; put in the trigger of detection) Platoons that were far away get the position of enemies, then check the distance to the closest target, if the distance is more than ( close_enouht + safe_dist ) * 1.2 is considered far and leader look for any vehicle near (cars, tanks, trucks), if there is any all platoons reserve positions in and get in. They will use vehicles of civilians too if they need!

    ---------- Post added at 02:05 AM ---------- Previous post was at 01:53 AM ----------

    execVM is basically "turn this file into code and then spawn it", while spawn just spawns the code given to it. Same deal with exec and call, except it calls instead of spawning a new "thread" (not an actual thread though, but it does run in "parallel". What I mean by "parallel" yet not true parallel is that the engine will basically alternate between the scripts and, as you said, will not wait for one to finish, so if one script is sleeping or waiting another can run in the meanwhile, and if multiple ones are running the engine will handle which ones get to run when so that they all get executed rather than 1 script freezing everything. However, as far as I know you will never have more than 1 script running on more than 1 CPU at any given time. It's kinda like running a multi-threaded application on a single CPU - it's just something that helps making things more logical, but doesn't actually help performance.

    Now I agree with u but disapoint in one thing, in my case I have some functions that requires sleeps for working properly, moreover this functions are used in any soldier of platoon, this means a sleep for each soldier and the result was an execution too slow on the main script, thanks to spawning functions I can run this ones in "parallel" while main script continues executing and dont wait for this sleeps, in this case I can see performance is much more better. I spect that spawn functions will use in low level new threads but this is only work of bohemia if it does or not. In Arma 2 has said that gets better profit of multiple cores I think in some way this will be doing, maybe someone of bohemia could respond to this better and get of any doubt.

    I propose u take a test with debug mode = 1 execute mision test, next do another test on a copy of the mission but changing all spawn for calls, then u will can see what I'm saying, version with spawn runs more faster and smother than version with calls.


  8. All u want is implemented in UPSMON, platoons of AI share known enemys to each others using a simple metod like this:

    {
    
    IF (_npc distance (_x) <= _sharedist ) THEN
    {							
    	_npc reveal (_x);					
    };
    } foreach _targets;		
    

    _npc is leader group

    _targets is an array of known targets

    _sharedist is distance to share the information

    not so simple is fullfilling _targets array:

    {			
    _knows=_npc knowsabout _x; 
    
    if ((alive _x) && (_knows>0.2)) then {																	
    	call (compile format ["KRON_targets%1 = KRON_targets%1 - [_x]",_sharedenemy]);				
    	call (compile format ["KRON_targets%1 = KRON_targets%1 + [_x]",_sharedenemy]);																			
    	 if ((_npc distance (_x) < _npc distance (_newtarget)) || !(alive (_newtarget))) then {
    		_newtarget = _x					
    	 };									 
    	 if (_maxknowledge==4 && _newtarget == _x) exitWith {};					 
    	_opfknowval=_opfknowval+_knows; 
    	_maxknowledge=_knows;	
    };		
    } forEach _enemies;
    

    y use dinamic arrays of enemys because of the side of AI will be different.

    if u want to simplify only use _targets array.


  9. Hi. I've been busy but yes, managed to try it out.

    Still giving the

    #typeOf

    error.

    It's very hard to identify it. This command line's only purpose is to give other clients the same content in the crate as the player who dropped the crate from humvee sees.

    :confused:

    The odd thing is that it does work regardless.... if only I could get rid of this error. Otherwise I'll end up removing the script all together

    try to set typeOf crate in a variable

    _tcrate = "";

    _tcrate = typeOf crate;

    if(isServer && (_tcrate == "USSpecialWeaponsBox")) then{

    crate setVehicleInit "handle = [] execVM ""scripts\weaponcargo.sqf""";

    };

    maybe u must do than too: _tcrate = toUpper(_tcrate)


  10. im tired and brain dieing... setting it global???

    publicvariable "SCOPY_mycounter"; ????

    defining to player didnt work...

    public variable is that begins other than "_" such as:

    SCOPY_mycounter = 10;    //this is a global variable

    Local variable are all ones that begins with "_" visibility of this variables is only in the current script or function.

    _SCOPY_mycounter = 10;  //this is a local variable


  11. I have the problem that the script creates the track markers (start, destination), but did not use the "TRACK" parameter at all - Calling the script only with [this,"Marker"]....

    Made a workaround by writing

    _track = "NOTRACK";

    at the specific line in upsmon.sqf, what really is dirty.

    Next thing is that using spanish in "player sidechat ..." is absolutely inappropriate IMO.

    I know spanish is one of the most-spoken languages at all (omg I hope this is not Portuguese instead of Spanish, if so I'm sorry for my ignorance). But there are still more people out there who are NOT speaking spanish and there are still more people out there who can at least understand english.

    For me I am neither a native english speaking person, still I try to comment or output information ingame in english to keep it as international as possible.

    So please please please please please either cut the "player sideChat 'Spanish stuff'" and replace it with lets say "diag_log 'Spanish stuff'" or use english sentences or use a stringtable.

    Last thing: I am deeply impressed by the AI movement and behavior in your work, thanks for it.

    This is because KRON_UPS_Debug = 1.

    set the variable KRON_UPS_Debug = 0; in scripts\common\init_UPSMON.

    Sorry avout language, u are right, I will try to translate in next revision.

    ---------- Post added at 01:33 PM ---------- Previous post was at 01:20 PM ----------

    Hi there, i was just wondering if there is a respawn version of this available.

    i.e similar to norrins modification for the original ups, where you can define a respawn position for group in the script and how many times then can respawn??

    this is norrins respawn, for the original UPS:- http://www.armaholic.com/page.php?id=6540

    Would this be possible with your version?

    Thanks

    Yes is posible but u need to change the reference to script of UPS scritp UPS_INIT

    changing UPS_INIT for this

    //  UPS_init.sqf
    // © JULY 2009 - norrin
    
    _unit 	= _this select 0;
    _marker	= _this select 1;
    
    [_unit,_marker] execVM "scripts\upsmon.sqf";
    
    if (true) exitWith {};

    but I see that is not implemented any parameters of ups. If is util I will implement a parameter of respawn in UPSMON for doing this.

    Don't forget to add the reference to INIT_UPSMON in int.sqf

    call compile preprocessFileLineNumbers "scripts\Init_UPSMON.sqf";


  12. Hi scopy,

    1-Try using global variables, instead of using _amountofbombs try SCOPY_amountofbombs for example.

    2- too u could try using the player as a container of your variables

    player setVariable ["SCOPY_mycounter", _amountofbombs, true];

    _amountofbombs = player getVariable "SCOPY_mycounter";

    3- U can pas the variable as a parameter to each function

    NOTE:is important that if u use global variables or variables in objects u personalize this like "SCOPY..." to minimice the risk of other script of other people can use the same name.

    I hope this will help u


  13. Hi all,

    Thanks for the translation Splicer, I forget to translate :p in armaholic has been translated too.

    http://www.armaholic.com/page.php?id=9213

    v4.2.2

    - Added frontal attack

    - Added battle formations depending on situation.

    - AI can enter buildings to take defending positions or while attacking AI can patrol the buildings searching for enemies or fire positions.

    - Improved system to find, assign and get in the vehicles.

    - Optimized performance, it can be executed every 20 seconds.

    - Parameters modified: sharedist increased, react lowered, cycle increased.

    - Modified the AI combat behavior, it will change depending on the situation.

    - Fixed bug where reinforcements stopped patrolling if they hasn't any target.

    - More dynamic flanking positions.

    - Platoon with "NOMOVE" tends to hold positions and use the surrounding buildings.

    Well, when I say better performance I mean that I had have reduced the frecuency that needs to be executed for doing calculations. KRON_UPS_Cycle now is 20 seconds. This late represents the time to comunicate with other platoons. In adition to this I had added a wait in the init of each group for avoiding calculations will be done for each in the same time and free the processor.

    If u test, u could see that IA is more hard, "NOMOVE" platoons tends to hold position while "MOVE" platoons do flanking movements, in adition to this has been added formations, in close combat situations they usually move together in COMPACT COLUMN, while holding positions forms a LINE in front of enemy, moving large distances forms a COLUMN etc..

    Flanking position has been dinamiced, has been added frontal atack when flanking positions has been covered by friendly platoons.

    The most impresive in this version is seen platoons catching vehicles for long transports and the patrol of buildings.

    I tried to do videos for showing the news but I don't know why not sound, I hope someone can do a better video than these, I think this will not be so dificult XD.

    This is a sample mission for view how to implement UPSMON u can teleport doing click on map.

    SAMPLE MISION: http://www.megaupload.com/?d=9YRQG24O

    A litle explanation of marks: Green dot with number is the number of platoon and this actual position, green litle circle with cross is the destination of platoon.

    For your misions remember to change the debug parameter in init_UPSMON.SQF in order to quit messages and marks of position and destination platoons.

    KRON_UPS_Debug = 0; // With 0 no debug coments and no mark position.

    I hope see your impresion and ideas for news.

    Thanks to all

    Best regards,

    ---------- Post added at 09:50 AM ---------- Previous post was at 09:18 AM ----------

    As far as I can tell different spawned "threads" don't actually run in paralel, the game engine basically acts as the "operating system" and chooses which one to run when so that all of them get sufficient running time, and doesn't actually run them on actual windows threads. Splitting your code into multiple spawned scripts/functions unfortunately will do nothing to help performance. Spawning code is only really any good if it actually makes sense logically.

    "The new script is running in parallel, spawn does not wait for it to be done, instead spawn returns a Script handle. "

    http://community.bistudio.com/wiki/spawn

    I don't know how low level it runs but in my testings I noticed that spawning functions seems to run in parallel, principal process don't wait to finish it and continues runing, the result was more better performance than doing it with call. This is much util more over ordering units of group doing things like animations, getin, getout of vehicles and more commands that requires a litle sleep for good completion like enableAI. You can do the order and continue the principal process, each unit will do the order runing it in "parallel".

    In the only I don't noticed nothing is spawning the enterely script in the init of leader group, as u could see in the sample. I tried it with 20 platoons spawning UPSMON and another time with EXECVM, I noticed no diference, I think i read somewhere that each units runs in parallel, same as spawn.


  14. New version available

    //Version: 4.2.2

    // Added

    // Se ha añadido ataque frontal

    // Formaciones de combate en función de la situación

    // La IA puede entrar en los edificios a tomar posiciones de defensa y en ataque puede patrullarlos en busca de enemigos o posiciones de fuego.

    // Modificaciones:

    // Mejorado el sistema para localizar, asignar y entrar en vehiculos,.

    // Optimizado el rendimiento. Se ha mejorado para que se pueda ejecutar cada 20s.

    // Modificada la parametrización, sharedist incrementado, react reducido, cycle aumentado.

    // Modificada la actitud e la IA en combate, se ha dado más especialización en función de la situación.

    // Corregido bug que al enviar refuerzos hacía que dejaran de patrullar si no tenian ningún target

    // Posiciones de flanqueo más dinámicas.

    // Las escuadras con rol "NOMOVE" tienden a asegurar la posición y a hacer mayor uso de los edificios del entorno.

    Vehicle getin improved:

    Building patrol:

    Download

    To install you must put folder scripts of rar in your mission.

    MON_functions updated too.


  15. Great Script! I have implmented in my latest mission (Camel Joe) where is it door to door fighting. Combined with Zues AI, the fighting in town is pretty tense indeed!

    Only clarification I have is aside from reinfrocment what other options are there?

    Looking forward to future updates.

    Hi all, I'm working in new version wich improves IA's one more time. This is an advance, IA will use formations depending on the situation, for example in close combats will remain together. I am working in a better system to find and use vehicles too, that allow IA to use empty vehicles in base or of citicen in towns. This system will allow me to use helis and paratrops if far far away.

    Answering questions.

    KRON_UPS_reinforcement allows IA to send reinforcements. How it works, u need a group of IAs that will be reinforcement, that groups must have atribute "reinforcement" in this init, like this:

    nul=[this,"town", "nomove","reinforcement", "delete:",600] execVM "scripts\upsmon.sqf";

    Well, now only you need is to set KRON_UPS_reinforcement = true when u want to be reinforces called, for example when enemy is detected in the heart of a base or town, you create a trigger of detection and put in act:

    KRON_UPS_reinforcement = true;

    If u put some empty trucks or cars near u could see that IA uses it to aproach the near war point.

    I have been testing with calling UPSMON with spawn, the only way to run as spawn is compiling the function in the init of each unit, but I have not noticed diference. If any one want to test it try this:

    UPSMON = compile preprocessFile "scripts\UPSMON.sqf"; 
    nul=[this,"town", "move","reinforcement", "delete:",600] spawn Upsmon;
    


  16. Hi Inkompetent,

    Thanks for that intel. Since it is not 100% clear that unit's init lines will be processed before the mission's init.sqf, I wonder if it would be possible to compile and load the script by placing a game logic in the map?

    And if so, what code line would you enter in the game logic?

    The point is to avoid the overhead of having to have a list of all units to be used in the mission.

    Thanks much. Best, Splicer.

    Init_upsmon.sqf and upsmon.sqf are sincroniced, upsmon.sqf waits until init_ups has been executed, then this will not be the problem.

    I think may be spawn that executes in a new thread but i don't really know the way with the global variables.

    Put in init_upsmon.sqf KRON_UPS_DEBUG = 1 and saw the messages executing it in normal mode, in call mode and in spawn mode, this will report you if any problem find.

    Added some traslations in main post, may be not good english but I espect wil be mor readable than google translator


  17. Versión 5.0.7

    Project Space for Monsadas UPSMON at Dev-Heaven now available!

    Please Register for an account at Dev-heaven.net and post all your suggestions, bug-reports, support-request, etc. in the UPSMON Project Space under "Issues"

    Please open one Ticket for Feature-Request/Bug-Report/Support-Request only!

    Wiki:http://dev-heaven.net/projects/upsmon/wiki

    FAQ

    To turn of messages and marks on map edit init_upsmon.sqf and set debug to 0

    KRON_UPS_Debug = 0;

    Changes in version:

    // Added:

    // nowp = No waypoints will be created for this squad UNTIL ENEMY DETECTED

    // nowp2 = No waypoints will be created for this squad UNTIL ENEMY DETECTED AND DAMAGED

    // nowp3 = No waypoints will be created for this squad in any way.

    // Ambush2 Same as ambush but without using mines

    // Added spawn support for vehicles in squad

    // Modified:

    // FORTIFY moves leader too and prevents from moving when hurt

    // Solved bug in targetting of resistance

    // Solved bug when respawning a template squad were creating a new template

    // Solved bug that did exiting AI form vehicle when upsmon begins

    // Solved bug of squads loosing group and gets stucked

    // Avoid to take same position on buildings

    This is a personal projet to enhance IA in combat and making easier mission edition. I have used the version 2.0.3 of Urban Patrol Script de Kronzky. I have to congratulate Kromzky for his script UPS.sqf that has inspired me for doing UPSMON.

    With upsmon I don´t need to put any waypoints. My work area is in CHS Comunity so I will be pleased to meet you there

    http://www.simulacion-esp.com/v3/topic/18360-urban-patrol-script-version-monsada/page__gopid__60687entry60687

    //AI improvements

    * There is a General commander that organize the attack and defence of all UPSMON squads in the same side:

    o Squads of AI fights together as an army, so they comunicate each other by radio the enemy known positions.

    o flanking manauvers are taken depending on friendly position.

    o General commander can order to surrender entire side if army is seriously damaged

    * AI has enhanced actions and movements in combat:

    o AI can use smoke grenades.

    o AI run crouched when enemy is near or under fire.

    o AI does fire suppression and squad movement can be supressed by fire too.

    o AI moves are influenced by morale, so in low morale they can retreat.

    o AI can lay mines if enemy tanks are near.

    o AI avoid snipers when fired by uknown enemy.

    o AI paratroop near objectives if they take an hely.

    * AI take use of enviroment:

    o AI may use static weapons you place on map.

    o AI may use empty land vehicles for moving and or to attack.

    o AI may use empty helys for moving and or to attack.

    o AI uses buildings to take defence position and patrol them when leader thinks than enemy is near or using it.

    // Performance

    UPSMON Script runs 1 time every 20 seconds for every group of IA, new movements calculates every 60 s or less depending of under fire, enemy knowns...

    I have been implementing some functions in spawn mode to exploit the multithread of processors with very fast results.

    UPSMON has been tested in CHS comunity with more than 30 people and more than 25 groups of IA with UPSMON and the conclusion was perfect performance.

    //Download

    Dev-heaven

    //Installation

    Copy folder "scripts" into your folder mission.

    //How to Implement

    In init.sqf you need to load init_upsmon.sqf

    //Init UPSMON scritp
    call compile preprocessFileLineNumbers "scripts\Init_UPSMON.sqf";

    In the mission editor run UPSMON script in the lider of each group exec UPSMON, sample:

    nul=[this,"town", "move","reinforcement", "delete:",600] execVM "scripts\upsmon.sqf";

    //Global variables of Init_UPSMON.sqf

    //1=Enable or 0=disable debug. in debug could see a mark positioning de leader and another mark of the destinity of movement, very useful for editing mision
    KRON_UPS_Debug = 1;
    
    //Time that lider wait until doing another movement, this time reduced dinamically under fire, and on new targets
    KRON_UPS_react = 60;
    
    //Min time to wait for doing another reaction
    KRON_UPS_minreact = 30;
    
    //Max waiting is the maximum time patrol groups will wait when arrived to target for doing another target.
    KRON_UPS_maxwaiting = 30;
    
    // how long AI units should be in alert mode after initially spotting an enemy
    KRON_UPS_alerttime = 90;
    
    // how far opfors should move away if they're under attack
    KRON_UPS_safedist = 300;
    
    // how close unit has to be to target to generate a new one target or to enter stealth mode
    KRON_UPS_closeenough = 300;
    
    // how close units have to be to each other to share information, over this, will lose target
    KRON_UPS_sharedist = 800;
    
    //If enabled IA comunicating between them with radio defined sharedist distance, 
    KRON_UPS_comradio = 2;
    
    //Sides that are enemies of resistance
    KRON_UPS_Res_enemy = [east];
    
    //Frequency for doin calculations for each squad.
    KRON_UPS_Cycle = 20;
    
    //Height that heli will fly this input will be randomiced in a 10%
    KRON_UPS_flyInHeight = 100;
    
    //Max distance to target for doing paradrop, will be randomiced between 0 and 100% of this value.
    KRON_UPS_paradropdist = 250;
    
    //Enables or disables AI to use static weapons
    KRON_UPS_useStatics = true;
    
    //Enables or disables AI to put mines if armored enemies near
    KRON_UPS_useMines = true;
    
    //Distance from destination for seraching vehicles
    KRON_UPS_searchVehicledist = 500;
    
    //Percentage of units to surrender.
    KRON_UPS_EAST_SURRENDER = 10;
    KRON_UPS_WEST_SURRENDER = 10;
    KRON_UPS_GUER_SURRENDER = 15;
    
    //Efective distance for doing perfect ambush (max distance is this x2)
    KRON_UPS_ambushdist = 50;
    
    //Enable it to send reinforcements, better done it in a trigger inside your mission.
    KRON_UPS_reinforcement = false; 
    
    //Artillery support, better control if set in trigger
    KRON_UPS_ARTILLERY_EAST_FIRE = false; //set to true for doing east to fire
    KRON_UPS_ARTILLERY_WEST_FIRE = false; //set to true for doing west to fire
    KRON_UPS_ARTILLERY_GUER_FIRE = false; //set to true for doing resistance to fire
    

    //Parámeters of UPSMON.sqf

    The same as UPS of Kronzky, only new "reinforcement" for allowing a group to go where is called for.

    //  Required parameters:
    //    unit        = Unit to patrol area (1st argument)
    //    markername  = Name of marker that covers the active area. (2nd argument)
    //    (e.g. nul=[this,"town"] execVM "ups.sqf")
    //
    //  Optional parameters: //    random      = Place unit at random start position.
    //    randomdn    = Only use random positions on ground level.
    //    randomup    = Only use random positions at top building positions. 
    //    min:n/max:n = Create a random number (between min and max) of 'clones'.
    //    init:string = Custom init string for created clones.
    //    nomove      = Unit will stay at start position until enemy is spotted.
    //    nofollow    = Unit will only follow an enemy within the marker area.
    //    delete:n    = Delete dead units after 'n' seconds.
    //    nowait      = Do not wait at patrol end points.
    //    noslow      = Keep default behaviour of unit (don't change to "safe" and "limited").
    //    noai        = Don't use enhanced AI for evasive and flanking maneuvers.
    //    showmarker  = Display the area marker.
    //    trigger     = Display a message when no more units are left in sector.
    //    empty:n     = Consider area empty, even if 'n' units are left.
    //    track       = Display a position and destination marker for each unit.
    //    reinforcement  = Makes squad as reinforcement, when alarm KRON_UPS_reinforcement==true this squad will go where enemy were.
    //    reinforcement:x  = Makes squad as reinforcement id, when alarm KRON_UPS_reinforcementx==true this squad will go where enemy were.
    //    fortify = makes leader order to take positions on nearly buildings at distance 200 meters, squad fortified moves less than "nomove"
    //	spawned = use only with squads created in runtime, this feature will add squad to UPSMON correctly.
    //	nowp	= No waypoints will be created for this squad, so this squad will comunicate enemies but will not be moved, so you can do what you want with them using waypoints.
    //	ambush	= Ambush squad will not move until in combat, will wait for incoming enemies stealth and ambush when near or discovered.
    //	ambush:n	= Creates an anbush and wait maximun the especified time n in seconds. you can put 0 seconds for putting mines and go away if combined with "move" for example
    //	aware,combat,stealth,careless defines default behaviour of squad
    //	respawn = allow squad to respawn when all members are dead and no targets near
    //	respawn:x = allows to define the number of times squad may respawn.
    

    videos of youtube:

    5.0.4 Ambush:

    fortify and reinforcement:

    Getin:

    Building Patrol:

    paradrop:

    combat:


  18. Thanks Deadfast!! it runs ok.

    Another trouble, now I want to order a group of IA to "MoveToCargo", the problem is that IA disapear and apear in vehicle as cargo.

    I tried:

    _x moveinCargo _vehicle;

    _x action ["getInCargo", _vehicle];

    and

    _x action ["moveToCargo", _vehicle];

    but two first moves instantly, and the last, _x action ["moveToCargo", _vehicle]; does nothing.

    How can i do for the IA moves to vehicle and then gett in it?

×