Jump to content
Sign in to follow this  
Monsada

UPSMON - Urban Patrol Script Mon

Recommended Posts

Ahhh that makes sense ill give that a go but i recon that should do the Job !

MANY thanks that worked !

Edited by psvialli
Solved

Share this post


Link to post
Share on other sites

I cant get the UPS reinforcement to work on Takistan?

Im using Version: 5.0.9.

Even if I cut & paste from a mission where ups reinforcements works eg on Proving grounds on to Takistan the reinforcements are called for but they just dont move.:(

Using "Independents" & they are set to opforce:confused:

Is there an issue with either Takistan (topography?) or using "Independents" as reinforcements. Is there a "radio" distance limit to UPS Reinforcements?

Edited by jgaz-uk

Share this post


Link to post
Share on other sites

I may be missing something here but is it possible to make it so new waypoints are only given to patrols when they've reached the previous one?

At the moment I've got a vehicle patrol over quite a large area sticking only to roads but they dont patrol the whole area as every 30 seconds they get a new waypoint in a different direction.

Share this post


Link to post
Share on other sites

This mechanism is to help to avoid stucking of the units.

Actually if you switch off the debug you will not notice it, as you do not know if the AI going to the old way-point or new one :)

Share this post


Link to post
Share on other sites

This is getting me pretty frustrated..

how in the fuck do I get noslow to work?

my init line is simple enough, I just want these guys who are outside of a marker to move to it, in doing to they will engage the enemy when they reach the marker.

nul=[this,"thirsk","noslow","min:",3,"max:",5,"respawn:",2] execVM "scripts\upsmon.sqf"

Share this post


Link to post
Share on other sites
This is getting me pretty frustrated..

how in the fuck do I get noslow to work?

my init line is simple enough, I just want these guys who are outside of a marker to move to it, in doing to they will engage the enemy when they reach the marker.

nul=[this,"thirsk","noslow","min:",3,"max:",5,"respawn:",2] execVM "scripts\upsmon.sqf"

Expected behavior vs. actual behavior?

Share this post


Link to post
Share on other sites

Hello,

is it possible to change the behaviour of a unit? lets say that I have 2 groups,

1 patrolling and area, and the other one sitting idle (is there a behaviour for this?),

then on a trigger, like "enemy detected", change the behaviour of the sitting/idle group to fortify.

and another question, is there a good way to make something like 0-3 (or whatever) randomly spawned ambush groups along a road? seeing as they have to face the road and be about 80% of the ambush range away for it to work (this is still true right?) I sense it could get complicated.

If not maybe that could be a feature worth thinking about?

Thanks for a great script!

Share this post


Link to post
Share on other sites

I've been wanting this for a while but unfortunately I can't really figure out how UPSMON actually works to manage to do it myself... Is there any way to make enemies much more likely to patrol buildings and take building positions in combat instead of just running to positions outside of buildings when enough enterable buildings are available?

They already go in buildings sometimes, but currently this is very rare without the "fortify" command.

"fortify" itself is not a real solution because while it makes them go in buildings, it only makes them go into buildings near the leader's starting position and as soon as they have contact they often abandon their building positions and don't grab new ones.

Share this post


Link to post
Share on other sites

Unfortunately there is no such function at the moment in UPSMON.

at the moment ... "fortify" more less work like this: each unit is sent to the building position, and than moving stop, when enemy in contact the moving is allowed, so units can shoot but at the same time whole team try to make the formation (in Arma always units try to stay/keep the formation)... that's why they leave the positions.

Edited by Rafalski

Share this post


Link to post
Share on other sites

I have tried to use UPSMON with the ACE wound system for the last 2 evenings and can't get it to work.

I know about "ace_sys_wounds_noai = true;" but that makes no difference.

UPSMON works fine including the arty and spawning but then the wounding system stops working.

If I comment out the UPSMON lines in the init the wound system works fine.

I have taken out all other mods but the problem remains.

If anyone can point me to a mission using both or can suggest where the conflict might be ???

thanks

GH

Share this post


Link to post
Share on other sites
I have tried to use UPSMON with the ACE wound system for the last 2 evenings and can't get it to work.

I know about "ace_sys_wounds_noai = true;" but that makes no difference.

UPSMON works fine including the arty and spawning but then the wounding system stops working.

If I comment out the UPSMON lines in the init the wound system works fine.

I have taken out all other mods but the problem remains.

If anyone can point me to a mission using both or can suggest where the conflict might be ???

thanks

GH

I have had probems in the past getting the ACE wounding system to work with UPSMON. I have trawled through the code and cannot see a reason for it other than perhaps the event handlers getting mixed up. For my sanity these days if I build an ACE mission I don't use UPSMON, if I build a non-ACE mission I do! If an answer is found I would be grateful also.

----> EDIT

Here is a quick test mission for the unbelievers out there ;-)

Test Mission on Utes

The mission is set up to not use UPSMON. Run the mission in the SP editor and shoot the other guy in the leg. You will see that the Interaction menu gives you the options to stop bleeding, apply morphine etc.

Edit init.sqf and uncomment line 7 ;

//call compile preprocessFileLineNumbers "scripts\Init_UPSMON.sqf";

Run the mission again and shoot the other guy. You will see that examining shows he is fine (he's not!) and you will not have the option to fix him up.

Edited by Jedra

Share this post


Link to post
Share on other sites

Hello Jedra,

thank you for the sample mission,

have a look at:

Init_UPSMON.sqf line 33

//-------------------------------------------------------------------------------------------------------------------------------------

// These Variables should be checked and set as required, to make the mission runs properly.

//---------------------------------------------------------------------------------------------------------------------------------------------

// ACE Wounds System for AI (set TRUE to On, set FALSE to Off) !

ace_sys_wounds_noai = false; // set it as required

hope this is a solution ?

Edited by Rafalski

Share this post


Link to post
Share on other sites
Init_UPSMON.sqf line 33

Believe me, I have tried that - doesn't make any difference!

EDIT ---> Although I played around with this today and previously, you mentioning again made me re-look at the ACE documents...

ace_sys_wounds_noai - Switch to control whether AI units are subject to ACE wound effects.

Variable doesn't exist in missionNamespace - AI can pass out, require treatment, etc. This may influence how other AI units react to a wounded comrade.

Variable exists in missionNamespace - AI is not subject to same wound effects as human players.

The key thing here is 'exists in mission namespace'. It is not a boolean after all. So commenting out the line completely makes it NOT EXIST in the namespace and hence the ACE Wounding system works!! Setting it to true or false makes it EXIST in the namespace and hence turns off wounding for AI.

So, although your reply was not the answer, it did lead me to the answer - cheers!!

Edited by Jedra

Share this post


Link to post
Share on other sites

as you said comment the line works ?

// ACE Wounds System for AI (set TRUE to On, set FALSE to Off) !

// ace_sys_wounds_noai = false; // set it as required

PS. will be fixed to to comment not change to true or false...thanks for notice this problem

Edited by Rafalski

Share this post


Link to post
Share on other sites

Jedra

thanks for solving this!:cheers:

Now I can use two great mods together.

GH

Share this post


Link to post
Share on other sites

I have a problem with deleting units in groups that are running UPSMON. Some random errors seem to occur, even though I make sure to always delete the leader last and terminate the script handle before deleting him.

Is there any safe way to delete units that are running under UPSMON?

Share this post


Link to post
Share on other sites
I have a problem with deleting units in groups that are running UPSMON. Some random errors seem to occur, even though I make sure to always delete the leader last and terminate the script handle before deleting him.

Is there any safe way to delete units that are running under UPSMON?

The way I did this was just to 'SetDammage 1'. This way they went through the UPSMON processing cleanly (as UPSMON just assumed they were dead). If you have the delete handle set, then UPSMON deletes them itself.

Share this post


Link to post
Share on other sites

I don't want to use UPSMON delete feature, though, since I want enemies to only be deleted when no players are near for more than a certain amount of time, not just when they have been dead for more than a certain amount of time. I worked quite hard on a script to do just that (for both living and dead units), and find it much better, but again problem being with UPSMON not liking units disappearing even after the instance belonging to those units is terminated.

Share this post


Link to post
Share on other sites
I don't want to use UPSMON delete feature, though, since I want enemies to only be deleted when no players are near for more than a certain amount of time, not just when they have been dead for more than a certain amount of time. I worked quite hard on a script to do just that (for both living and dead units), and find it much better, but again problem being with UPSMON not liking units disappearing even after the instance belonging to those units is terminated.

Not sure then. You might have to dig into the UPSMON code - once a unit is dead there is a ton of code it runs to check if it was the leader and then works out who should be the leader instead. Look for where it deals with '_members' in and around line 2023 in MON_functions.sqf. You are probably going to have to remove your groups from the _members array directly in the UPSMON code.

I had to do something a bit similar when I was team switching people out of UPSMON and into a player group.

Share this post


Link to post
Share on other sites

There is no way to tell UPSMON to stop running like UPS used to, now is there? Since aborting it "cleanly" and waiting until it finishes running before deleting the units should get the job done. Of course this should be better than the "named" system in original UPS where each group had its own variable name and its script was ended setting a variable with an appropriate name.

Best would be "setVariable on one of the units in group? OK, script will stop when it can".

Edit:

Done!

...
[b]	// enable exit
_var = (group _npc) getVariable "UPSMON_exit";
if (!isNil "_var") then
{
	if (_var) then
	{
		_loop=false;
	};
};[/b]

}; //while {_loop}
...

Add this right before the end of the main loop. Works like a charm! Any chance to add this officially to UPSMON? Or are there additional possible issues this can cause that I am not seeing?

Edited by galzohar

Share this post


Link to post
Share on other sites

@galzohar has been working on this more/less this way as your example. Lack of free time in RL makes it slower to introduce in new versions.

Share this post


Link to post
Share on other sites

I also tried making "NOSLOW" work, however even after changing all setWaypointSpeed and setSpeedMode lines to account for the "NOSLOW" parameter, units still often walk...

Share this post


Link to post
Share on other sites

Is there a way to get UPSMON tanks/apc deploy smoke in OA like they do in A2? Or do they only deploy smoke when facing other tanks.

Share this post


Link to post
Share on other sites

Can I use CDF or Bluefor as the units for patrolling?

My player is Opfor.

I think my answer is in this thread but there are 125 pages to go through.

If it is possible, where do I substitute the units in the script, specifically?

Thanks!

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  

×