Jump to content
Sign in to follow this  
Monsada

UPSMON - Urban Patrol Script Mon

Recommended Posts

Hi guys

Im having one little problem with upsmon that I havent been able to find or solve. The problem is that enemy ai units dosent mater the dificulty apear on the map like if y play on recruit. Do you know how to solve it?

Amazing script its so much easy to make coops now.

Thanks for the help

Share this post


Link to post
Share on other sites
Hi guys

Im having one little problem with upsmon that I havent been able to find or solve. The problem is that enemy ai units dosent mater the dificulty apear on the map like if y play on recruit. Do you know how to solve it?

Amazing script its so much easy to make coops now.

Thanks for the help

The only thing I could think of, are the debug markers, that I believe are on by default. Read the documentation and turn them off. If that's not it, a screenshot showing what you don't want to see would probably help.

Share this post


Link to post
Share on other sites

Hi seba thanks for the help, its not the debug its turned of im going to make a screen and post it.

Share this post


Link to post
Share on other sites

Haveing an issue with Respawning Vehicles :-

nul=[this,"strelka","init:","respawn:",10] execVM "scripts\upsmon.sqf"

It respawns but the guys never get back in the Vehicles they set off on foot ?

Any idea how to get them bck into the vehicles ?

Ta

Share this post


Link to post
Share on other sites

ive got this strange bug that my marker that my upsmon units are meant to patrol moves to the bottom left corner of the map when the upsmon units spawn NOW

the units still spawn where the marker originally was and still patrol so alls well um NO!

see my marker is created every time a new task is started after the old 1 is finished now i delete the marker then recreate it using

   _createpatrolmarker = createMarker ["E_Patrol",getMarkerPos "taskarea"];
   _createpatrolmarker setMarkershape "ELLIPSE";
   _createpatrolmarker setMarkersize [300,300];
   //_createpatrolmarker setMarkerAlpha 0;// this is // out for testing only

now the issue its seems to cause is after a few tasks all the upsmon units seem to spawn down the bottom left corner with the marker. meaning task area is empty of enemy

this is how i spawn the enemy units and join them to upsmon

   switch (_group) do
   	{
        case 0: {_units = ["TK_INS_Soldier_Sniper_EP1"];};
        case 1: {_units = ["TK_INS_Soldier_AT_EP1"];};
        case 2: {_units = ["TK_INS_Soldier_MG_EP1"];};
        case 3: {_units = ["TK_INS_Soldier_AA_EP1"];};	
        case 4: {_units = ["TK_INS_Soldier_Sniper_EP1"];};
        case 5: {_units = ["TK_INS_Soldier_TL_EP1"];};
        case 6: {_units = ["TK_INS_Soldier_4_EP1"];};
        case 7: {_units = ["TK_INS_Bonesetter_EP1"];};			 
       };


      [color="#FF0000"] _spawngroup = [getMarkerPos "E_Patrol", EAST, _units, [],[],[],[],[1,1]] call BIS_fnc_spawnGroup[/color];        
       // Add the created group to an array of groups so we can reference them later
       _rebelArray set[(count _rebelArray), _spawngroup]; //dont worry bout this its for a delete upsmon array down the bottom

      [color="#FF0000"] [leader _spawngroup,"E_Patrol","spawned","randomup","nowait","nofollow","nomove"] execVM "scripts\upsmon.sqf"; //"randomup" [/color]

       };


does any 1 know how to solve this or has any 1 had this issue as well

cheers

Share this post


Link to post
Share on other sites

I would try moving the marker to the next task and not deleting it , it looks like they spawn and the marker is not there , so they spawn 0,0,0 or add a sleep after you recreate the marker before you spawn to see if that helps.

Share this post


Link to post
Share on other sites

thanks mate i tried those and in the end i decided to create the marker on the map in the editor named E_patrol then use this to move it around

	_gamelogic = center;
	_towns = nearestLocations [getPosATL _gamelogic, ["NameVillage","NameCity","NameCityCapital"], 25000]; 


	_RandomTownPosition = position (_towns select (floor (random (count _towns)))); 

	_marker = createmarker ["taskarea",_RandomTownPosition];
	"taskarea" setmarkershape "ELLIPSE";
	"taskarea" setmarkersize [300,300];
	sleep 5;
[color="#FF0000"]		    "E_Patrol" setMarkerPos getMarkerPos "taskarea";
            "E_Patrol" setMarkerColor "ColorRed";
                   "E_Patrol" setMarkerAlpha 1;[/color]
       sleep 5;	



but now the marker is visible at mission start then moves to the task area as meant to then after the 20 secound sleep command and instantly when upsmon units start to spawn the marker disapears. when i have the alpha set to 1 so it should stay i think any way.

also just noticed even thought upsmon units are spawning in the marker area i am also getting upsmon debug markers the ones with circle and x in middle with numbers spawning in bottom left corner.

just to confirm i am doing this right i have on the map 1 unit of each faction set to 0% probability and the functions module on board on all my scripts n in my init i have

waituntil {!isnil "bis_fnc_init"};

and all i add for upsmon is

in init.sqf

call compile preprocessFileLineNumbers "scripts\Init_UPSMON.sqf";

and my spawn sqf

   switch (_group) do
   	{
        case 0: {_units = ["TK_INS_Soldier_Sniper_EP1"];};
        case 1: {_units = ["TK_INS_Soldier_AT_EP1"];};
        case 2: {_units = ["TK_INS_Soldier_MG_EP1"];};
        case 3: {_units = ["TK_INS_Soldier_AA_EP1"];};	
        case 4: {_units = ["TK_INS_Soldier_Sniper_EP1"];};
        case 5: {_units = ["TK_INS_Soldier_TL_EP1"];};
        case 6: {_units = ["TK_INS_Soldier_4_EP1"];};
        case 7: {_units = ["TK_INS_Bonesetter_EP1"];};			 
       };


       [color="#FF0000"]_spawngroup[/color] = [getMarkerPos "E_Patrol", EAST, _units, [],[],[],[],[1,1]] call BIS_fnc_spawnGroup;        
       // Add the created group to an array of groups so we can reference them later
       _rebelArray set[(count _rebelArray), _spawngroup];

       [color="#FF0000"][leader _spawngroup,"E_Patrol","spawned","randomup","nowait","nofollow","nomove"] execVM "scripts\upsmon.sqf"; //"randomup"[/color] 

       };

thats it.

have i maybe missed something

Share this post


Link to post
Share on other sites

To keep the marker visible you need to have "showmarker" as UPS hides the marker, that is why it disappears but it is still there just invisible.

I presume they spawn @ 0,0,0 but then move to the marker ? or do they stay at 0,0,0 ?

Share this post


Link to post
Share on other sites

ill email you the code mate for you to check do you mind

---------- Post added at 23:22 ---------- Previous post was at 23:17 ----------

i just emailed it to you

Share this post


Link to post
Share on other sites

NP, Ill take a look tonight and send it back :)

OK just had a look , and it works for me !?

I removd the call compile preprocessFileLineNumbers "scripts\Init_UPSMON.sqf"; inm Missis Init as you do not need ocallit again.

They spawn @ 0,0,0 then move to the marker as they should , what results are you getting ?

Edited by psvialli

Share this post


Link to post
Share on other sites

Not sure if this is possible but can you stop the Respawn parameter early ? i.e exit our early if a condition in meet ?

I am using "Respawn:", xx and I would liek to keep them spawning but stop if I complete a task ?

Thanks

Share this post


Link to post
Share on other sites

i'm still very new to a lot of this stuff and having a problem i can't seem to figure out. i'm trying to use the MON spawn script with a trigger to spawn a small enemy patrol when BLUEFOR is detected. i've essentially copied the sample code from the devheaven page for testing purposes, including the 'airport' and 'town2' markers.

in the init of the template group's squad leader:

nul = [this,"airport","move","delete:",300,"reinforcement:",1,"template:",1,"respawn"] execVM "scripts\UPSMON.sqf";

in the trigger act:

nul = [1,position player,1,["town2","respawn"]] execVM "SCRIPTS\UPSMON\MON_SPAWN.SQF";

question 1: the UPSMON debug shows the spawn triggering properly, but they don't seem to appear. is there anything amiss in the above code?

question 2: again, being fairly new to some of this stuff, i'm a bit confused about how best to use the position parameter to designate where they spawn. "position player" is self-explanatory, but what if i want them to spawn in/around a specific compound on the map? i've poked around the BIS wiki and i tried creating a small marker right in front of myself in the editor named "test", then tried to use "getmarkerpos test" for the spawn position but it too had no effect. is there a better (or at least functional) way of achieving this relatively easily? again, i'm just trying to be able to spawn enemy patrols when the BLUEFOR player is detected in the vicinity via trigger.

thanks a lot for any help!

update: as usual, i figure my problem out a few minutes after posting. not even sure what the problem was -- i think it was that i forgot the quotations for the markername after the getmarker pos command (changing getmarkerpos test to getmarkerpos "test" seemed to do it). can someone confirm this though?

Edited by HFTB

Share this post


Link to post
Share on other sites

I can confirm that was certainly at least one of the problems :). I was about to point that out but you beat me to it.

Share this post


Link to post
Share on other sites

yeah mate any thing that references a marker name you need the ""

i.e

"mkr"

getMarkerPos "mkr"

createMarker "mkr"

Share this post


Link to post
Share on other sites

OK need some help on Artillery!

I have set KRON_UPS_ARTILLERY_EAST_FIRE = true; when bluefor are ion the area but only want them to fire once or twice then wait for say 10 min and fire again if still in area and spotted , and idea how to do that , as they just keep firing

Share this post


Link to post
Share on other sites

i'm having an issue where markers are disappearing from the map if they are referenced in a groups init/UPSMON parameters. i'm working on a mission which uses insurgency-style markers (red squares to indicate hostile areas), and if i reference one of the markers to have a group patrol or fortify within it, or if have a group triggered to spawn at a marker, it disappears. for groups i've placed in the editor, the marker will disappear as soon as they initialize, but for groups who i attempt to spawn into a marker dynamically via a trigger, the marker is fine until the group is triggered and spawns, at which point the marker will disappear.

anyone have any ideas why this might be?

Share this post


Link to post
Share on other sites
OK need some help on Artillery!

I have set KRON_UPS_ARTILLERY_EAST_FIRE = true; when bluefor are ion the area but only want them to fire once or twice then wait for say 10 min and fire again if still in area and spotted , and idea how to do that , as they just keep firing

A bit late but... you need to adjust one of the parameters in the init line of the static arty piece being used by UPSMON:

nul=[this,3,3000,100,7,2,"ARTY_Sh_81_HE",25] execVM "scripts\UPSMON\MON_artillery_add.sqf";

25 is the # of seconds between salvos.. so for 10 minutes you can change this to 600

Share this post


Link to post
Share on other sites

would someone mind explaining exactly how the "respawn" parameter works (the 'indefinite' usage, not the set limit of spawns)? i've read the information on devheaven and used the parameter to good effect but i'd like to better understand how the script handles the ceasing of indefinite respawns for a unit when the enemy is too close (i.e. they will continously respawn, but as i understand it, they will cease to respawn if the enemy is too close to them or something -- that's the bit i'm curious about).

Share this post


Link to post
Share on other sites

It's a simple check. Before they respawn out the blue, it's common for that kind of trick to check whether there are enemies near, and pospone the respawn until it's clear. That's to prevent enemies from spawning 5 meters in front of you, for example.

Share this post


Link to post
Share on other sites

Do you know what the actual distance check is though? I don't think that is explained anywhere... ie: 300m? Even better is it a variable I can change?

Share this post


Link to post
Share on other sites

i was asking because of questions like the ones savageCDM has posed. i was also curious as to whether they would stop respawning permanently once an enemy was too close for them to spawn, or whether they would continue spawning once the enemy moved away again.

Share this post


Link to post
Share on other sites
i was asking because of questions like the ones savageCDM has posed. i was also curious as to whether they would stop respawning permanently once an enemy was too close for them to spawn, or whether they would continue spawning once the enemy moved away again.

They will resume respawning as soon as the area is cleared of enemies.

---------- Post added at 19:19 ---------- Previous post was at 17:51 ----------

@HFTB & SavageCDN: Sorry guys, I guess too much time has passed since the last time I've used this mod. After trying to find the number for SavageCDN, I realized there's not such thing in UPSMON. My memories about that feature were from DAC.

UPSMON does not take any consideration when spawning units, so there's no check for any enemy force near the respawn point. Obviously, I may be mistaken again :), but after a quick look at the code I believe this is the right answer.

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  

×