Jump to content
nomadd

SLP Spawning script

Recommended Posts

and of course just as i get things working how I wanted them, they release a patch a break the whole damn thing

Share this post


Link to post
Share on other sites

I will try and get a new version up today. You can make the change in SLP_units_config if you need it the fix faster. Just copy and paste what is below to SLP_units_config.

private ["_Leaderunits","_units","_vehicles","_tanks","_faction","_temparray","_spawnname","_debug","_helo","_plane"];
if (!isServer) exitWith {};
_faction = _this select 0;
_spawnname = _this select 1;
_temparray = [];
_debug = SLP_ARRAY select 0;


/*/////////////////////////////////////////////////////////////////////////////////////
When you set up the arrays the pilot class is first, then the crew type classes are second
Example:
_units = [ pilot, crew , units....]

*//////////////////////////////////////////////////////////////////////////////////////
//=============================================================================================================================================
switch (_faction) do 
{    
case 0: //opfor
{
	_Leaderunits = 	["O_soldier_SL_F","O_soldier_TL_F"];
	_units =	   	[
					"O_helipilot_F","O_soldier_F","O_soldier_GL_F","O_soldier_AR_F","O_soldier_LAT_F","O_soldier_TL_F","O_soldier_F","O_soldier_F","O_medic_F",
					"O_soldier_repair_F","O_soldier_M_F","O_soldier_exp_F"
					];
	_vehicles = 	["O_Ifrit_GMG_F","O_Ifrit_MG_F","O_Ifrit_F","O_Quadbike_F"];
	_tanks = 		[];
	_helo = 		["O_Ka60_F"];//,"O_Ka60_Unarmed_F"
	_plane =     	[];
};
case 1: //bluefor
{
	_Leaderunits = 	["B_Soldier_TL_F","B_Soldier_SL_F" ];
	_units =		[
					"B_Helipilot_F" ,"B_Soldier_F","B_Soldier_F","B_soldier_AR_F","B_soldier_exp_F","B_Soldier_GL_F","B_soldier_M_F","B_soldier_repair_F","B_soldier_LAT_F",
					"B_Soldier_lite_F"
					];
	_vehicles = 	["B_Hunter_HMG_F","B_Hunter_F","B_Hunter_RCWS_F","B_Quadbike_F"];
	_tanks = 		[];
	_helo = 		["B_AH9_F"];//"B_MH9_F"
	_plane =     	[];
	};
case 2: //Civilian	
{
	_Leaderunits = 	["C_man_1","C_man_1_1_F","C_man_polo_1_F"];
	_units =		["C_man_1","C_man_1_1_F","C_man_1_2_F","C_man_1_3_F","C_man_polo_1_F","C_man_polo_2_F","C_man_polo_3_F","C_man_polo_4_F","C_man_polo_5_F","C_man_polo_6_F"];
	_vehicles = 	["c_offroad"];
	_tanks = 		[];
	_helo = 		[];
	_plane =		[];
};		 

/*case #: //Takistan army	
{
	_Leaderunits = 	[""];
	_units =		["pilot class","Crew class","units"];
	_vehicles = 	[];
	_tanks = 		[];
	_helo = 		[];
	_plane =		[];
};		 
*/
Default
{
	if(_debug == 1) then
	{
		hintc format [ "Error Spawnname %1: SLP_units_config ... Not a valid config number/n/nSpawn call aborted",_spawnname];
	};
};
};


_temparray = _temparray + [_Leaderunits,_units ,_vehicles,_tanks,_helo,_plane];

_temparray

Share this post


Link to post
Share on other sites

Thanks again for making this. Just as in A2, the 'hunt' feature in SLP is among my favorite things about this whole Arma thing. Much appreciated.

Currently, I'm using the 'attack' parameter to set up enemy waves, randomly spawning from around a camp, similar to your example in the demo. I just have them coming on their own, not by radio trigger (it's great fun to have wave after wave coming from random, I just don't have a good idea yet on how to 'win' such a mission - suggestions?)

Anyway, what I wanted to ask was; there is this cool Opfor speedboat with guns, and I wanted to have a wave of bad guys coming in from the sea route to add to the waves coming from land & air (working on defending Camp Tempest, which sits next to the water). Would it be possible, can it be possible, to maybe eventually have a new section in units_config for Ships?

That way there could be, like... ya know.. ships.

Share this post


Link to post
Share on other sites

Updated with new class name for Opfor vehicle. No other changes at this time, so keeping the same version number.

New version front page.

You can also just copy the SLP_units_config I posted above, or manually go in and change the classname.

---------- Post added at 05:36 PM ---------- Previous post was at 05:12 PM ----------

@R.Flagg

Glad to hear you are finding SLP usable. What you are wanting to do is pretty easy. I just never got around to documenting it. There are 2 options one very simple, the other a little more complex but gives you the ability to change the number of attacking waves everytime you play.

1st option

Every time a group is spawned I use a variable to keep count. It is SLP_Instances. So if you are spawning 20 groups to attack a base you can set up a trigger with SLP_Instances > 19 or SLP_Instances == 20. Then in the trigger/script do whatever you want, once that condition is true.

2nd option

uses the paramsarray. Set a class in paramsarray

exp:

		class waves
       {
	// paramsArray[0]
               title = "Number of enemy groups(waves) to attack Town";
               values[] = {10,20,30,40};
               texts[] = {"10 groups", "20 groups ", "30 groups", "40 groups"};
               default = 20;
       };
	class delay
       {
	// paramsArray[1]
               title = "Delay between waves";
               values[] = {5,15,25};
               texts[] = {"5 secs: fast", "15 secs: medium", "25secs: slow"};
               default = 5;
       };

You can also set the delay here to change the speed of the spawn. Then in the script spawn do

["spawnname",[0,0,(paramsArray select 1)],[[spawn positions in array]],[(paramsArray select 0),[5,8]],[],[],[],["attack",attackobj]] spawn SLP_spawn; 

if you want to have some more fun you can also use paramsarray to change the number of units per group or the number of vehicles

		class EnemyInfsize
       {
	// paramsArray[2]
               title = "		Number of Enemy Units in Infantry Groups";
               values[] = {3,6,9};
               texts[] = {"6", "9", "12"};
               default = 3;
       };
	class Enemyvehgroups
       {
	// paramsArray[3]
               title = "Number of Enemy Vehicles Groups";
               values[] = {0,1,2,3};
               texts[] = {"0", "1", "2", "3"};
               default = 1;
       };
	class Enemyvehsize
       {
	// paramsArray[4]
               title = "		Number of Enemy Units in Vehicles Groups";
               values[] = {0,1,2,3};
               texts[] = {"0", "1", "2", "3"};
               default = 1;
       };

your SLP_spawn line would then look like this

["spawnname",[0,0,(paramsArray select 1)],[[spawn positions in array]],[(paramsArray select 0),(paramsArray select 2)],[paramsArray select 3),(paramsArray select 4)],[],[],["attack",attackobj]] spawn SLP_spawn;

Then just use a trigger to check SLP_Instances.

SLP_Instances == ((paramsarray select 0) + (paramsarray select 3))

The only problem with either of these is SLP_Intances keeps track of all spawns for SLP. So if you are spawning other units it will throw the count off, but If you know how many other groups you are spawning you can just subtract that number

SLP_Instances == ((paramsarray select 0) + (paramsarray select 3) - x);

or

1st option

SLP_Instances == (20-x);

Hope this helps and is not too confusing. I have a couple of base defense missions me and friends play and this is the set up I use. If you need any more help just post. If you have ARMA2 I will be happy to upload one of my missions for you to look at

Edited by Nomadd

Share this post


Link to post
Share on other sites

Wow. Thanks so much for taking the time to spell all that out. Very kind. Soon as I get back to my gaming computer I'll give 'er a go.

(any thoughts on the request concerning ships?)

Share this post


Link to post
Share on other sites

I am working on putting boats into SLP. The problem I am having are waypoints are not working over water. Neither CBA_fnc_taskpatrol nor BIS_fnc_taskpatrol will work on water. I am not sure about editor placed waypoints, just haven't had the time to fully test everything. ARMA3 still being ALPHA this problem will probably get addressed and fixed. If it doesn't then I will see what can be done as a work around.

Share this post


Link to post
Share on other sites

Sorry to be a bother, but I have absolutely no idea how to do this. I've read the readme, but it still confused me.

I'm pretty new to all of this, so if you could help me out I would truly appreciate it. I've been making a mission for the last few days, and a few of my friends who have helped me test it say that the amount of enemies, after a while, cause lag.

Basically, what I'd like to do is set up an area that, once the blufor enter it, enemies spawn at Air Station Mike 26, for example. How exactly would I do that? If you could provide as much detail as possible, I would appreciate it so much.

Thanks,

Evil

Share this post


Link to post
Share on other sites

@EvilDave

I will be happy to help you anyway I can. One of the best things is to open the demo mission in the editor, and look at how things are done. I have an example of a trigger that when something enters it OPFOR will spawn. You can easily change the condition to BLUEFOR - "Present" then set the SLP line to spawn the number of units/vehicles you would like. You are welcome to copy anything from the demo mission to your mission then change it according to your needs/wants.

As for lag, if you try and spawn a massive amount of units/vehicles at once you will get lag. Also, lag can be from your system/server not being able to handle all the units/vehicles spawned. One last thing, ARMA3 is still ALPHA so optimization is not what it could be.

One thing I want to do is look into SLP taking advantage of Headless Client, but atm I don't fully understand how HC works. I also have no way of testing headless client with my current setup. If you are not familiar with HC it will allow one of your cores to handle just the AI. My hope is BI will implement HC is much more user friendly way. Maybe BI can just make it so server AI will automatically use any available core(s).

If you want me to look at your mission, just send it to me. I can set up what you are wanting then you can look at it. That would probably be easier and less confusing than trying to type out an explanation.

Share this post


Link to post
Share on other sites

Just wanted to say thank you Nomadd, for donating your time to helping me out, because everything is working great. Mission is cool, victory condition is working too.

Now I just need to wait for more stuff for the editor to be released (like watchtowers for each side of base so spotters can look out for enemy waves, etc) and I'll be in great shape.

Thank you sir!

TOC2OnLoad.gif?attredirects=0

Share this post


Link to post
Share on other sites

NP R.Flagg, glad everything is working. As soon as more units/vehicles are released I will update SLP. Of course SLP is set up to take advantage of any armies released. You can use as many different units as you like. Just put them into the SLP_units_config. Here is an example I use in my missions in ARMA2


private ["_Leaderunits","_units","_vehicles","_tanks","_faction","_temparray","_spawnname","_debug","_helo","_plane","_noerror"];
if (!isServer) exitWith {};
_faction = _this select 0;
_spawnname = _this select 1;
_temparray = [];
_debug = SLP_ARRAY select 0;
_noerror = true;

/*/////////////////////////////////////////////////////////////////////////////////////
When you set up the arrays the pilot class is first, then the crew type classes are second
Example:
_units = [ pilot, crew , units....]

*//////////////////////////////////////////////////////////////////////////////////////
//=============================================================================================================================================
switch (_faction) do 
{    
case 0: //VC
{
	_Leaderunits = 	["uns_rf_vc9a","uns_rf_vc8a","uns_local_vc1c","uns_local_vc1a","uns_rf_vc8a","uns_mf_vc4a","uns_mf_vc4b","uns_rf_vc3a"];
	_units =	   	[
					"","","uns_local_vc1b","uns_local_vc1c","uns_local_vc1d","uns_local_vc1e","uns_local_vc2a","uns_local_vc2b","uns_rf_vc8a","uns_rf_vc8a",
					"uns_local_vc2c","uns_local_vc2d","uns_local_vc2e","uns_rf_vc2a","uns_rf_vc3a","uns_rf_vc3b","uns_rf_vc4b","uns_rf_vc3b","uns_rf_vc11a",
					"uns_rf_vc5asni","uns_rf_vc11a","uns_rf_vc8a","uns_mf_vc4a","uns_rf_vc3a","uns_rf_vc3b"
					];
	_vehicles = 	[];
	_tanks = 		[];
	_helo = 		[];
	_plane =     	[];
};
case 1: //NVA
{
	_Leaderunits = 	["uns_nva1","uns_nva1c","uns_nva1b","uns_nva1","uns_nva4rpg","uns_nva8g","uns_nva7rto","uns_nva8d","uns_nva8f"];
	_units =		[
					"","","uns_nva10a","uns_nva9c","uns_nva7arto","uns_nva8b","uns_nva8a","uns_nva8a","uns_nva8a","uns_nva8b",
					"uns_nva3mg","uns_nva2med","uns_nva4rpg","uns_nva8g","uns_nva7rto","uns_nva8d","uns_nva8f","uns_nva8b","uns_nva8b",
					"uns_nva3amg","uns_nva8h","uns_nva4arpg","uns_nva6sap","uns_nva5sni"
					];
	_vehicles = 	[];
	_tanks = 		[];
	_helo = 		[];
	_plane =     	[];
	};
case 2: //Takistan army	
{
	_Leaderunits = ["TK_Soldier_SL_EP1","TK_Soldier_Officer_EP1"];
	_units =[
					"TK_Soldier_Pilot_EP1","TK_Soldier_Crew_EP1","ACE_TK_Soldier_2B14_AB","ACE_TK_Soldier_KonkursAG","ACE_TK_Soldier_KonkursG","ACE_TK_Soldier_RPOM","TK_Special_Forces_MG_EP1",
					"TK_Soldier_EP1","TK_Soldier_B_EP1","TK_Soldier_LAT_EP1","TK_Soldier_AT_EP1","TK_Soldier_AA_EP1","TK_Soldier_AAT_EP1",
					"TK_Soldier_AMG_EP1","TK_Soldier_HAT_EP1","TK_Soldier_AR_EP1","TK_Soldier_Engineer_EP1","TK_Soldier_GL_EP1","TK_Soldier_MG_EP1",
					"TK_Soldier_Medic_EP1","TK_Soldier_Sniper_EP1","TK_Soldier_SniperH_EP1","TK_Soldier_TWS_EP1","TK_Soldier_Spotter_EP1",
					"TK_Special_Forces_EP1","TK_Special_Forces_TL_EP1"
					]; // "TK_Soldier_Night_2_EP1","TK_Soldier_Night_1_EP1",
	_vehicles = 	["UAZ_Unarmed_TK_EP1","V3S_TK_EP1","V3S_Open_TK_EP1","UAZ_MG_TK_EP1","UAZ_AGS30_TK_EP1","LandRover_MG_TK_EP1","LandRover_SPG9_TK_EP1"];//,"GRAD_TK_EP1","Ural_ZU23_TK_EP1"
	_tanks = 		["BMP2_TK_EP1","BRDM2_TK_EP1","BRDM2_ATGM_TK_EP1","BTR60_TK_EP1","M113_TK_EP1","T34_TK_EP1","T55_TK_EP1","T72_TK_EP1","ZSU_TK_EP1"];
	_helo = 		["Mi24_D_TK_EP1","Mi17_TK_EP1","UH1H_TK_EP1"];	
	_plane =     	[];

};		 
case 3: //RUS
{
       _Leaderunits = 	["RU_Soldier_SL","RU_Soldier_TL","RU_Soldier_Officer"];
	_units =		[
					"RU_Soldier_Pilot","RU_Soldier_Crew","RU_Soldier","RU_Soldier_GL","RU_Soldier_MG","RU_Soldier_Medic","RU_Soldier_Sniper","RU_Soldier_SniperH",
					"RU_Soldier","RU_Soldier_AT","RU_Soldier_Medic","RU_Soldier","RU_Soldier_AR","RU_Soldier_LAT","RU_Soldier",
					"RU_Soldier_Marksman","RU_Soldier_HAT","RUS_Soldier_GL","RU_Soldier_AA"
					];
	_vehicles = 	["UAZ_RU","Kamaz","KamazOpen","UAZ_AGS30_RU","GRAD_RU","ACE_UAZ_MG_RU","ACE_Ural_RU","ACE_Ural_ZU23_RU","ACE_UralOpen_RU"];
	_tanks = 		["BMP3","BTR90","ACE_T72BA_Base","ACE_T72B_Base","ACE_T90A","GAZ_Vodnik","GAZ_Vodnik_HMG","2S6M_Tunguska",
					"ACE_BMP2_RU","ACE_BMP2D_RU","ACE_BRDM2_ATGM_RU","ACE_BRDM2_HQ_RU","ACE_BTR70_RU","ACE_ZSU_RU"];
	_helo = 		["ACE_Ka50","ACE_Mi17_RU","	ACE_Mi24_V_FAB250_RU","Mi17_rockets_RU","Mi24_V","Mi24_P",
					"Ka52","Ka52Black"];			
	_plane =     	["ACE_Su30","ACE_Su34_MR","ACE_Su27_CASP","ACE_Su27_CAS","ACE_Su27_CAP","Su34","Su39"];
};
case 4: // INSURGENTS
{
       _Leaderunits = 	["Ins_Soldier_CO","Ins_Soldier_2","Ins_Soldier_1"];
	_units =		[
					"Ins_Soldier_Pilot","Ins_Soldier_Crew","Ins_Soldier_1","Ins_Soldier_GL","Ins_Soldier_MG","Ins_Soldier_AR","Ins_Soldier_AT","Ins_Soldier_Medic",
					"Ins_Soldier_AA","Ins_Soldier_AR","Ins_Soldier_2","Ins_Soldier_Sniper","Ins_Soldier_Sab","Ins_Soldier_Sapper","Ins_Soldier_1"
					];
	_vehicles = 	["UAZ_INS","UAZ_MG_INS","UAZ_AGS30_RU","UAZ_SPG9_INS","Offroad_DSHKM_INS","Pickup_PK_INS","Ural_INS","GAZ_Vodnik","GAZ_Vodnik_HMG"];
	_tanks = 		["BRDM2_INS","BRDM2_ATGM_INS","BMP2_INS","T72_INS","ZSU_INS"];
	_helo = 		["ACE_Mi24_D_INS","Mi17_Ins","Mi24_V","Mi24_P"];
	_plane = 		["Su25_Ins"];
};
case 5: //USMC
{
       _Leaderunits = 	["USMC_Soldier_SL","USMC_Soldier_TL","USMC_Soldier_Officer"];
	_units =		[
					"USMC_Soldier_Pilot","USMC_Soldier_Crew","USMC_Soldier","USMC_Soldier_GL","USMC_Soldier_AR","USMC_Soldier","USMC_Soldier_Medic","USMC_SoldierS","USMC_SoldierS_Engineer",
					"USMC_Soldier_LAT","USMC_Soldier_MG","USMC_Soldier","USMC_Soldier_AA","USMC_Soldier_HAT","USMC_SoldierS_Sniper",
					"USMC_Soldier","USMC_SoldierS","USMC_SoldierM_Marksman","USMC_Soldier_AR","USMC_Soldier_GL","USMC_Soldier","USMC_SoldierS_SniperH"
					];
	_vehicles = 	["HMMWV","M1030","HMMWV_Armored","HMMWV_MK19","HMMWV_TOW","HMMWV_Avenger","MTVR"];//
	_tanks = 		["ACE_M1A1HC_TUSK","ACE_M1A1HC_TUSK_CSAMM","LAV25","AAV","M1A1","M1A2_TUSK_MG"];//"ACE_M1A1HC_DESERT","ACE_M1A1HC_TUSK_CSAMM_DESERT","ACE_M1A1HC_TUSK_DESERT"
	_helo = 		["ACE_AH1W_TOW_TOW_W","ACE_AH1W_TOW_W","ACE_AH1W_AGM_AGM_W","ACE_AH1W_AGM_W","MH60S","UH1Y","AH1Z","MV22"]; //
	_plane =		["A10","f35b","AV8B","AV8B2"];
	};
case 6: // UNSUNG SF
{
	_Leaderunits = 	["uns_sf_1a","uns_sf_1aa","uns_sf_2a","uns_sf_2aa"];
	_units =		[
					"","","uns_sf_2amed","uns_sf_2aamed","uns_sf_3amg","uns_sf_3bmg","uns_sf_3cmg","uns_sf_7arto","uns_sf_7aarto","uns_sf_8a","uns_sf_8b",
					"uns_sf_8c","uns_sf_9a","uns_sf_9b","uns_sf_9c","uns_sf_10a","uns_sf_10b","uns_sf_10c","uns_sf_11a","uns_sf_11b","uns_sf_11c"
					];
	_vehicles = 	[];
	_tanks =		[];
	_helo = 		[];
	_plane =		["uns_a1j"];
};
case 7:	// UNSUNG civilians
{
	_Leaderunits = 	["uns_civilian1","uns_civilian2","uns_civilian3","uns_civilian4"];
	_units =		[
					"","","uns_civilian1","uns_civilian2","uns_civilian3","uns_civilian4"
					];
	_vehicles = 	[];
	_tanks = 		[];
	_helo = 		[];
	_plane =		[];
};
Default
{
	if(_debug == 1) then
	{
		hintc format [ "Error Spawnname %1: SLP_unitsACE_config ... Not a valid config number\n\nSpawn call aborted",_spawnname];
		_noerror=false;
		} else {
		_noerror = false;			
	};
};
};
if (_noerror) then {
_temparray = _temparray + [_Leaderunits,_units ,_vehicles,_tanks,_helo,_plane];
} else {
_temparray =[];
};

_temparray


I have Unsung units, ACE units, BIS units

Share this post


Link to post
Share on other sites

Ahh, thank you very much Nomadd. I didn't even see your mission file in the folder. Guess it's a sign of getting old haha.

I messed with some things and got it working. Thanks!!

Share this post


Link to post
Share on other sites

For handing over AI to UPSMON making it a task could work too, for example:

case "UPSMON": {[(leader _grp),_tsk1,"nowait","noslow","delete:",60,"spawned"] execVM "scripts\upsmon.sqf";};

Share this post


Link to post
Share on other sites

Well I had some time,and I did some more testing. I found some interesting things. I need to test things more, but it is late and I am going to bed. Mainly putting this up here to see if anyone else has noticed these things.

When using CBA_fnc_taskpatrol, BIS_fnc_taskpatrol or UPS units will get glitched whenever trying to cross a guard rail. Once the units are glitched that is it, they will not move. All the units do at that point is a stand/crouch loop. If one unit in a group gets glitched the whole group stops moving. If I use editor place waypoints, guardrails do not seem to be problem. This looks like it is just scripted/spawned waypoints that are the problem. I noticed this with guardrails, but I am sure other objects will cause the same problem.

I have been testing spawning boats. I can get boats to spawn no problems, but with CBA_fnc_taskpatrol the boat will just sit near the waypoint. It will never complete the waypoint. The boat may move around just a bit, but that is it. With BIS_fnc_taskpatrol the boat will always move toward land no matter how far out in the water it is. Editor placed waypoints seem to work fine. Again this looks like scripted/spawned waypoints are the problem.

Share this post


Link to post
Share on other sites

NEWEST VERSION:

v3.2 front page

changelog

-various changes

-fixed armor not spawning crew but just regular units

NEW

-added _boat array in SLP_units_config. You can now spawn boats. To spawn a boat:

0=["trg1",[0,2],[trg1,50],[],[],[],[1,1,"boat"],["patrol",300]] spawn SLP_spawn;

you can use "helo","plane",or"boat" , if you put nothing then the default is "helo"

-added examples of using UPS in the SLP_tasks, Thanks to ssechaud for the suggestion

0=["trg1",[0,2],[trg1,50],[],[],[],[1,1,"boat"],["UPS","mrkname"]] spawn SLP_spawn;

Couple of notes, vehicles(boats,helos) do not like being in/over water. Normal "patrol" does not work. Boats will work somewhat when using UPS. Helos so far will do nothing over water, no matter what you use. As I posted above editor waypoints seem to work fine, it is just spawned/scripted that do not want to work.

Share this post


Link to post
Share on other sites

Fantastic news Nomadd! Can't wait to try it out. Starting to get even more excited by this. Especially now that you've explained the instance counter. Plan on making ever-increasingly difficult waves via the instance count in various triggers.

Thanks man! :)

Share this post


Link to post
Share on other sites

Hotfix

changelog

-fixed a mislabled variable

Newest version front page

v3.3

Share this post


Link to post
Share on other sites

First thx for this awsome piece of Code ;)

But i don't get it. I try too geht this UrbanPatrolSkript to work. In the redme you are writing somthing about the UPS has too pick up the Unit and we should add "spawned" param to the String.... Is this in the current version necessary ?

Sorry just starting with editing in Arma ;)

With the task ["ups","mrkname"] it is no problem but one very nice feature from the ups skript is not working. When using the ups script alone the units in a eclipse of 100 meters can communicate and shortly after one unit gets alerte the hole base knows about the intruder. But when I call it with ["ups","mrkname"] this conmunication thing is not working. If I shoot one patrol the others not reacting too that they are chilingl and making straight there duty ;)

I hoppe you can understand my problem ;)) and maybe have a solution.

Sorry for the bad English !

Share this post


Link to post
Share on other sites

@R0T

That is partly my fault. I am using UPS in the ARMA3 demo. UPS does not need the "spawned" paramater. The readme is brought over from ARMA2, I updated the readme some but not enough. In the readme it is using "UPSMON", as the example, UPSMON is very similar to UPS. UPS was first then UPSMON took it and expanded what it can do. In the ARMA2 version of SLP I am using UPSMON in demo and readme.

As for the communication, make sure in UPS.sqf the #define sharedist is set to 100 or whatever you want

//    track         = Display a position and destination marker for each unit.
//
// =========================================================================================================

if (!isServer) exitWith {};

// how far opfors should move away if they're under attack
// set this to 200-300, when using the script in open areas (rural surroundings)
#define SAFEDIST 75

// how close unit has to be to target to generate a new one 
#define CLOSEENOUGH 10

// how close units have to be to each other to share information
#define SHAREDIST 100 <-- THIS LINE 

// how long AI units should be in alert mode after initially spotting an enemy
#define ALERTTIME 180

// ---------------------------------------------------------------------------------------------------------
//echo format["[K] %1",_this];

Also, if you change the directory of where UPS is located then you need to change it in SLP_tasks.

//----------------------------------------------------------------------------------------------------------------------------------
// Can add or change Tasks here      
	if (_CBA_present) then {
    	case "PATROL":	{[_grp, _tsk2, _tsk1, 7, "MOVE", "SAFE", "YELLOW", "NORMAL", "STAG COLUMN", "_grp spawn CBA_fnc_searchNearby", [5+(random 5),10+(random 5),15+(random 5)]] call CBA_fnc_taskPatrol;};    			
    	case "DEFEND":	{[_grp, _tsk2,_tsk1, 2,true] call CBA_fnc_taskdefend;};
		case "ATTACK":	{[_grp,_tsk1,50,"SAD", "Aware", "RED","Normal","LINE", "_grp spawn CBA_fnc_searchNearby"] call CBA_fnc_addWaypoint;}; 			                           
		case "HUNT":  	{[_grp,_tsk1] spawn SLP_hunt;}; 					 
    	case "BUILDING":{_tskp=_tsk2 call SLP_fnc_getpos;sleep .1;[_tskp, units _grp,_tsk1,0,[],false,true] call shk_buildpos;};  
		case "CRBHOUSE":{{[_x, _tsk1, true] execVM "scripts\crB_HousePos.sqf"} foreach units _grp;};    					
		case "BPATROL":	{_tsk2p = _tsk2 call SLP_fnc_getpos;[_grp, _tsk2p,_tsk1] call BIS_fnc_taskPatrol};		
		case "UPS" : {[leader _grp,_tsk1,"nowait"] execVM "scripts\ups.sqf"}; <--Change here
		case "UPSUP" : {[leader _grp,_tsk1,"nowait","randomup"] execVM "scripts\ups.sqf"};<-- change here
//  	case "":{}; ///add new task here                                                                                                       
	} else {
		case "PATROL":	{_tsk2p = _tsk2 call SLP_fnc_getpos;[_grp, _tsk2p,_tsk1] call BIS_fnc_taskPatrol};		
		case "DEFEND":	{
							_tskp= if (typename _tsk1 == "NUMBER") then {_tsk2 call SLP_fnc_getpos} else {_tsk1 call SLP_fnc_getpos};
							[_grp, _tskp] call BIS_fnc_taskdefend;
						}; 
		case "ATTACK":	{[_grp, _tsk1] call SLP_attack};	
		case "HUNT":  	{[_grp,_tsk1] spawn SLP_hunt}; 
   		case "BUILDING": {_tskp = _tsk2 call SLP_fnc_getpos;[_tskp, units _grp,_tsk1,0,[],false,true] call shk_buildpos};
		case "CRBHOUSE":{{[_x, _tsk1, true] execVM "scripts\crB_HousePos.sqf"} foreach units _grp};    						
		case "UPS" : {[leader _grp,_tsk1,"nowait"] execVM "scripts\ups.sqf"}; <---or change here
		case "UPSUP" : {[leader _grp,_tsk1,"nowait","randomup"] execVM "scripts\ups.sqf"};<---or change here
//   	case "": {};  ///add new task here            
//----------------------------------------------------------------------------------------------------------------------------------

There should be no reason why the units are not communicating. SLP just spawns the units, then UPS or UPSMON can take over. I will try and test it tonight and see what is going on. If UPS is controlling the spawned units , giving waypoints etc. I cannot see why the communication would not be working.

Share this post


Link to post
Share on other sites

Hey Nomadd,

i have changed the parts you have said but ther is no change in the behavior. I think this is a bug in UPS skript. After testing it alot with spawns and directly with the UPS skript in the init line of a unit there are some very odd behaviors. I will Question Kronzky the Author from the UPS Skript.

I recogniced that if you set a unit with the UPS skript in the init line and a enemy nearby behind a wall - the UPS controlled unit is instandly allerted and in aware mode. I further tested what happens when i set the SHAREDIST too 5000 - another unit 500 meters away doesnt canged there behavior ..... must be a bug !

But after all thx again for you afford on your skript !!! I LIKE !!!

Share this post


Link to post
Share on other sites

R0T,

Glad you were able to look into it, from what you posted looks like you found the problem. I have been busy with family and work, and have not had a chance to do much of anything with A3.

Share this post


Link to post
Share on other sites

Hey nomadd,

After testing testing testing .... I have learned a good lesson ;) being setCaptive true is not like being setCaptiv false .....oh the shame.... It was my fault ! Sorry ;)

So your script just perfect ;) !!!

But the ups script has still a very odd behavior. For example. If a unit is set "safe" and is then being alerted in the test and you switch out of the preview and restart again the unit is still aware. It's like the aware status is safed in the ram or somthing like that. The only fix ist too save the mission befor you test it again so the ram is erased and voila the unit is in safe status again !

So happy coding and keep up your good work - When you find the time beside your family and job ;)

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

×