Jump to content
kronzky

Urban Patrol Script

Recommended Posts

What should I add to the Expression field of the A3 Editor's Vehicle Respawn Module to make the respawned vehicles initialise UPS again?

Sorry if this has been asked before, but my mind is fried! This is one of the only 2 things remaining for my mission to be complete, and im finding it really difficult to get clear answers (u havent found any!!!).

Share this post


Link to post
Share on other sites

What do I have to chane to hide the markers that UPS creates? I've never done anything with scripts before...

Share this post


Link to post
Share on other sites

Anyone found solution for AI going into Combat mode when enemy

side is present on map ?

Regards Drxi

Share this post


Link to post
Share on other sites

Nop, no solution here. Though it doesn't happen all the time. And oddly I encountered the same bug using a different AI mod, namely the GAIA thingy from MCC Mission Control Center.

Share this post


Link to post
Share on other sites

If you are part of the patrolling group, make sure that you're not raising your weapon, as that will switch everybody into Alert mode.

Share this post


Link to post
Share on other sites

The AI going into combat seems to be related to the behavior of other nearby friendly units on the same side (including those not using UPS).

By default a placed units behaviour is 'Aware' which will appear to trigger the script around line 567;

... behaviour _x in [[b]"AWARE","COMBAT"[/b]] ...

I removed the 'Aware' check from the script as this was sufficent for my needs. You could also use the 'NOSHARE' param within the script itself or use 'setBehaviour' on relevant units to prevent this from happening.

Share this post


Link to post
Share on other sites
Nop, no solution here. Though it doesn't happen all the time. And oddly I encountered the same bug using a different AI mod, namely the GAIA thingy from MCC Mission Control Center.

Its not a bug but a feature :) Units share information. If units go in combat mode even if no other units from the zone did spot them yet, yes then it is a bug.

Share this post


Link to post
Share on other sites

Sometimes Units go into combat mode even when there are no enemies around at all. Civs or friendly units not controlled by UPS (respectively GAIA) are enough. In one mission I placed a bunch of civs inside of buildings while GAIA controlled CSAT groups where patrolling outside. Sooner or later one GAIA group started to investigate a building with a civ inside like they spotted an enemy at that location (while the nearest enemy unit was 4 kilometers away). Obviously they couldn't find the suspected enemy but within minutes the whole zone started to search the area around that one building.

Thing is that it doesn't happen in every mission. Sometimes it works as expected (at least as far as I can tell). On other occasions even friendly troops not controlled by GAIA/UPS are enough to trigger the described response. Must admit I'm running a bunch of other mods too (e.g. ASR_AI), however last time I checked the bug occurred without any additional mods loaded (i.e. vanilla for UPS, and only CBA+MCC for GAIA).

I'll test the fix from LSD whenever I have time and see if that solves the issue.

Share this post


Link to post
Share on other sites
Sometimes Units go into combat mode even when there are no enemies around at all. Civs or friendly units not controlled by UPS (respectively GAIA) are enough. In one mission I placed a bunch of civs inside of buildings while GAIA controlled CSAT groups where patrolling outside. Sooner or later one GAIA group started to investigate a building with a civ inside like they spotted an enemy at that location (while the nearest enemy unit was 4 kilometers away). Obviously they couldn't find the suspected enemy but within minutes the whole zone started to search the area around that one building.

Thing is that it doesn't happen in every mission. Sometimes it works as expected (at least as far as I can tell). On other occasions even friendly troops not controlled by GAIA/UPS are enough to trigger the described response. Must admit I'm running a bunch of other mods too (e.g. ASR_AI), however last time I checked the bug occurred without any additional mods loaded (i.e. vanilla for UPS, and only CBA+MCC for GAIA).

I'll test the fix from LSD whenever I have time and see if that solves the issue.

It should only happen if the "civ" is considered an enemy towards the side of the faction. Will check this with MCC only (so gaia). That said. Target sharing is handled much differently then UPS, however considering if somebody is enemy is technicaly (if i remember correctly) done in the say way.

Share this post


Link to post
Share on other sites
Sometimes Units go into combat mode even when there are no enemies around at all. Civs or friendly units not controlled by UPS (respectively GAIA) are enough..

I've encountered that same issue just now when making another mission - Placed a handful of soliders, after picking apart the script some AI consitently go into 'Combat' behavior alerting all the other units - The only enemy unit on the map was behind a hill miles away - Assume it's a BIS bug/feature but I'll investigate further to see if I can work around it at all.

No fault with UPS as it is just doing what it's told - The UPS script is just acting accordindly to the AIs behaviour who happen to be very trigger happy, going into combat mode when the wind changes.

Share this post


Link to post
Share on other sites

Hellow. How can I remove showing of patrol zones during briefing ? Thanks.

Just hide the markers. I dont have code off top of my head but something with setmarkercolor 0; or something. Just Google it. Place it in the init.sqf

Share this post


Link to post
Share on other sites

@Baton1990

 

Place the following code in your init.sqf

{_x SetMarkerAlpha 0} forEach ["YOURMARKERNAME","YOURMARKERNAME","YOURMARKERNAME","YOURMARKERNAME"];

Share this post


Link to post
Share on other sites

hi all ...

 

ATM -after 1.50 release- it seems that UPS is no more working and I am wondering what is the cause of this error :

21:09:41 Error in expression </*-------------------------------------->
21:09:41   Error position: </*-------------------------------------->
21:09:41   Error Invalid number in expression

Share this post


Link to post
Share on other sites

 

hi all ...

 

ATM -after 1.50 release- it seems that UPS is no more working and I am wondering what is the cause of this error :

21:09:41 Error in expression </*-------------------------------------->
21:09:41   Error position: </*-------------------------------------->
21:09:41   Error Invalid number in expression

I'm pretty sure this error is caused by CBA. Make sure you have the latest version.

Share this post


Link to post
Share on other sites

Great Script :)

 

Couple of questions,

1. I want to make a mission with around 100 AI in town,  Do i need to place 100 AI and put the code to each sqd leader, or can i use a module and make them spawn when triggered,  thinking about the server lag, spawning that many AI.

 

2. I put a sqd of AI down,  they walked across town patroling,  Then they seem to have wondered off, followed them and they are 3 miles away from spawn area ??

 

Thanks

Share this post


Link to post
Share on other sites

@ tankbuster : thanks for the hint, updating CBA has done it !

 

@ thesh1tgamer : spawning 100 IA in town is not a good idea, for this purpose, I am using a trigger and a simple reinforcement script to spawn units with UPS [... all my missions are using this, that's why I was so annoyed to get errors !]

Share this post


Link to post
Share on other sites

 

 

I am using a trigger and a simple reinforcement script to spawn units with UPS

Good idea, can u give a quick expalantion howto

Share this post


Link to post
Share on other sites

I cannot get this to work anyone else having issues?

It still works, it just exhibits some odd behaviour at times eg groups going "active" before they have seen enemies.

Share this post


Link to post
Share on other sites

Not sure how active this still is, but is UPS still one of the go-to patrol scripts? I'm mainly asking because I've just added it to a coop mission I'm working on, and while the fire teams whose leaders I've added the required command to seem to be moving as intended, I do get a long error message when I start the mission. (I couldn't copy it this morning when I added UPS, but I should be able to post it later today.)

 

As far as I can tell, everything is as it should be: I've got five named rectangular markers, one fire team in each area, ups.sqf in the mission folder and nul=[this,"<marker name>"] execVM "ups.sqf" in the team leaders' init field.

Share this post


Link to post
Share on other sites

Here's the error message I get:

 

'_this setFeatureType (|#|parseNumber _value)'
Error parsenumber: Type Number, expected Bool,String
Number,Object,Side,Group,Text,Config entry, Display (dialog), Control,Network
Object,Team member,Task,Location

Share this post


Link to post
Share on other sites

My apologies - I've figured out what caused the error and it wasn't UPS. Since me implementing UPS occurred at the same time as something else, which I didn't expect to have any impact), I made an incorrect assumption.

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

×