• Announcements

    • Jervant

      Bohemia Store Steam Redeem   06/24/17

      We started experiencing problems with the Steam redeem from our Store on Friday June 23rd.   For anyone that got affected by this, please go to your store account, after you select the product you purchased, you should see your steam key with a link to a how to article to activate it manually through Steam.   We apologize for the inconvenience.
kronzky

Urban Patrol Script

172 posts in this topic

I noticed that the combat mode thing has happened when I have a friendly unit placed with

This setPos [ getPos this select 0, getPos this select 1, (getPos this select 2) +1]

with something I on in A2 the other day.

Removing that unit made everyone calm down.

Share this post


Link to post
Share on other sites

Yes, for some reason you need 1 Marker for each unit/group or they will be in 'combat' mode.

Share this post


Link to post
Share on other sites
Yes, for some reason you need 1 Marker for each unit/group or they will be in 'combat' mode.

I'm not sure that's the issue. I've tried that for a fix with the same result...the OPFOR enter "alert" mode without any apparent knowledge of BLUFOR. If you take the test mission that comes with the UPS script and modify it slightly you can see the behavior exhibited. Take that mission and move the BLUFOR unit to an area as far away as possible. Now replace the "player" with an OPFOR unit so you can observe them as they patrol. In less than a minute the OPFOR will become agitated though there is no possible way they could know about the BLUFOR on the other side of the map. Now go back in the editor, delete the BLUFOR unit and observe again. You will see they remain "CARELESS" and just meander around the town.

To make it easy to test:

ups_test.Stratis.zip

Share this post


Link to post
Share on other sites
I'm not sure that's the issue. I've tried that for a fix with the same result...the OPFOR enter "alert" mode without any apparent knowledge of BLUFOR. If you take the test mission that comes with the UPS script and modify it slightly you can see the behavior exhibited. Take that mission and move the BLUFOR unit to an area as far away as possible. Now replace the "player" with an OPFOR unit so you can observe them as they patrol. In less than a minute the OPFOR will become agitated though there is no possible way they could know about the BLUFOR on the other side of the map. Now go back in the editor, delete the BLUFOR unit and observe again. You will see they remain "CARELESS" and just meander around the town.

To make it easy to test:

ups_test.Stratis.zip

Yeah I can confirm this, trying to set individual groups to their own marker makes no difference whatsoever.

Share this post


Link to post
Share on other sites

Ditto! Did more testing and could of swore that fixed it. Maybe broke in recent update?

I use this script for vehicles and seems to work great, especially Heli patrols.

For now, just go back and use Dismissed for your soldiers. Works really well for meandering.

Share this post


Link to post
Share on other sites

First of all, thank you to Kronzky for this great script!

I am completely new to ArmA as well as especially to editing but this is something I'm very interested in! I was working on my first mission when I stumbled upon the UPS, so I put it in! ;)

Now here is my problem: I have read through the whole thread in order to avoid mistakes that may have been discussed before but I still don't have a solution. I created a simple mission: one player; one OpFor unit; a marker as a patrol area. I wrote the code in the init of the OpFor and I saved the ups.sqm file in the mission folder under "Arma 3 - Other Profiles\myname\missions\Patrol_Test", as well as the init.sqf.

When I hit "Preview" in the editor, everything works fine. The OpFor unit immediately starts patrolling.

But as soon as I start playing the mission as a scenario, when loaded I always get the "script ups.sqm not found" warning. The mission starts, but the OpFor unit doesn't move. I don't know where the mistake is, since it works from within the editor.

The ups.sqm definitely is saved in the mission folder. I even saved it in every mission folder there is (the two in the profile branches and the two in the Arma 3 folder of the steam application, out of confusion and just to make sure.

I guess, since I am an editor noob - I did something stupid. But I cannot figure it out. Maybe some of you can help?

Also, another question: when saving the mission in the editor, it is only saved, but not yet playable. When exporting it, it also creates the mission in the steam folder (the .pbo file). I copied the ups.sqm file there, too, as I said. Does that make any sense?

Thank you in advance for your help, and hello to everybody (my first post on the forum)! ;)

Meta

Share this post


Link to post
Share on other sites

Im getting a problem where my markers used for the script are visible in the briefing, I can't figure out where to add "setMarkerAlpha" in, even at the start of my init doesnt seem to work, they disappear after you load into the map, but Id rather people not see in the briefing where they might be ambushed

Share this post


Link to post
Share on other sites

found the problem thanks anyway, stupid mistake on my behalf

Edited by Thirster

Share this post


Link to post
Share on other sites

I have finally found the mistake I made! Since I assume there are more newbies here like me, I'd like to share it with you. This is one possible reason why the ups.sqf cannot be found: What I hadn't realized yesterday is that when saving a mission in the editor, you need to put every script file in the mission folder BEFORE you save it again as a playable mission! I somehow got confused and I suppose I changed the mission name during the process, saved it again and then exported it as a multiplayer mission. Hence, no scripts in the .pbo file, which is a container.

But now it worked, and at last I have finished my first mission! I will share it on this forum as well - on Steam, it is online already! ;)

First of all, thank you to Kronzky for this great script!

I am completely new to ArmA as well as especially to editing but this is something I'm very interested in! I was working on my first mission when I stumbled upon the UPS, so I put it in! ;)

Now here is my problem: I have read through the whole thread in order to avoid mistakes that may have been discussed before but I still don't have a solution. I created a simple mission: one player; one OpFor unit; a marker as a patrol area. I wrote the code in the init of the OpFor and I saved the ups.sqm file in the mission folder under "Arma 3 - Other Profiles\myname\missions\Patrol_Test", as well as the init.sqf.

When I hit "Preview" in the editor, everything works fine. The OpFor unit immediately starts patrolling.

But as soon as I start playing the mission as a scenario, when loaded I always get the "script ups.sqm not found" warning. The mission starts, but the OpFor unit doesn't move. I don't know where the mistake is, since it works from within the editor.

The ups.sqm definitely is saved in the mission folder. I even saved it in every mission folder there is (the two in the profile branches and the two in the Arma 3 folder of the steam application, out of confusion and just to make sure.

I guess, since I am an editor noob - I did something stupid. But I cannot figure it out. Maybe some of you can help?

Also, another question: when saving the mission in the editor, it is only saved, but not yet playable. When exporting it, it also creates the mission in the steam folder (the .pbo file). I copied the ups.sqm file there, too, as I said. Does that make any sense?

Thank you in advance for your help, and hello to everybody (my first post on the forum)! ;)

Meta

Share this post


Link to post
Share on other sites

Hi guys, I love this script, but, I would like to change something which I have no idea how to do. As is the unit/group which is using the script walk/run quite fast, they go prone then stand up and run then repeat this all over. I would love to have the units/group be much more slower and simply walking around their waypoints as if nothing is going on untill they spot an enemy and then can run faster, is this possible? if so can someone explain just how to do it? I know about changing "Random", "RandonDN", NOAI, etc etc. Thanks all.

Share this post


Link to post
Share on other sites

Hi folks

I have to modify the UPS.SQF to FIX a bug with last ARMA3 Dev Version:

_usetrigger = "NOTRIGGER"; //if ("TRIGGER" in _UCthis) then {"TRIGGER"} else {if ("NOTRIGGER" in _UCthis) then {"NOTRIGGER"} else {"SILENTTRIGGER"}};

No problem more with kron_ variable.

Share this post


Link to post
Share on other sites

Is Kronzky still working on this to fix it up for A3? Havent seen a post from him in this thread for about 3 months now?

Share this post


Link to post
Share on other sites

Found a minor oddity with the script - west groups will detect resistance groups as enemies, even if the factions are set as friendly. The two squads enter combat mode and infinitely try to outflank each other.

edit: ahh, found your TODO marker "FIND A WAY TO DETERMINE ASSOCIATION OF RESISTANCE UNITS" :)

For the moment I've just stopped west / resistance from being added to each others' _enemies array.

​edit2:

I'm making a large scale mission with UPS that involves spawning / deleting lots of groups. I noticed UPS gets caught in an infinite loop if an entire squad is deleteVehicle'd while running. I added a line to catch this possibility.

// nobody left alive, exit routine
if (count _members==0) then {
   _exit=true;
} else {
   // did the leader die?
   if (!alive _npc) then {
       _npc = _members select 0; 
       group _npc selectLeader _npc;
       if (isPlayer _npc) then {_exit=true};
   };
   // MOD by Bhaz: support for deleteVehicle and deleteGroup on squads running UPS.
   if (isNull _npc) then {_exit=true};
};

Edited by bhaz

Share this post


Link to post
Share on other sites

I had this working yesterday, now I open up the editor today and for some reason all my patrols stand there and do nothing... The script is being called because if I delete the UPS file then it shows an error when I preview.

Anyone got any ideas why its suddenly stopped working? :(

Share this post


Link to post
Share on other sites

I'm making a large scale mission with UPS that involves spawning / deleting lots of groups. I noticed UPS gets caught in an infinite loop if an entire squad is deleteVehicle'd while running. I added a line to catch this possibility.

yea, without a true reduction & cache feature built into it, making a full scale mission is really beyond the scope of this script. How is it going as far as rpt errors are concerned, does the script run cleanly at least?

Share this post


Link to post
Share on other sites

Anyone found a fix for the units not patrolling in safe and limited speed? I have a pair of units in their own marker area and they patrol but in the wrong behaviour and speed. enemy units haven't event landed on the island yet and the units cannot see the enemy.

Any ideas?

Share this post


Link to post
Share on other sites

I get an error on every startup of a mission I created with UPS pointing at an undefined variable in expression _e for line 51 of UPS.sqf:

// convert argument list to uppercase
_UCthis = [];
for [{_i=0},{_i<count _this},{_i=_i+1}] do {_e=_this select _i; if (typeName _e=="STRING") then {_e=toUpper(_e)};_UCthis set [_i,_e]};

And since I have no serious knowledge of scripting, I'd be very happy if someone would point out a solution to this error or tell me that converting the argument list to uppercase has no serious effects on my mission. :)

Share this post


Link to post
Share on other sites

Thanks Kronzky for one of the most useful scripts around the secene. You may check my mission Capture & Hold, uses UPSmon, which is the son of this. You are on the credits, sorry for the typo, I will correct it ASAP.

Share this post


Link to post
Share on other sites
yea, without a true reduction & cache feature built into it, making a full scale mission is really beyond the scope of this script. How is it going as far as rpt errors are concerned, does the script run cleanly at least?

About a month late =/, yeah it runs very cleanly. I'm running my own cache scripts though to delete / respawn groups in range, but the script starts and exits every time without any error. Running debug markers, sometimes the markers don't get deleted but that was the case beforehand anyway.

Share this post


Link to post
Share on other sites

It looks like during the forum downtime some messages got lost, so I'll try again:

There was one syntax error that was caused by the latest A3 patch, and it has been fixed by version 2.1.3 that's now available on my site.

As far as the error Pergor is reporting, I can't really reproduce that (perhaps it was a temporary issue that was fixed by the latest update).

Regarding bhaz's post about friend/enemy associations: I guess we finally have the tools to determine that (via getFriend), so expect an update to UPS soon, that should have this ability implemented.

The issue with deleting groups/group leaders, and your suggested test for {isNull _npc} shouldn't really be necessary, as the {!alive _npc} should already catch deleted leaders. Also, if the group is deleted, then the member count should be 0, and that is tested already as well. When I tried deleting groups and leaders from the outside, while UPS was running, it always stopped without any issues or errors.

If you still see problems when deleting stuff from the outside, see if you can give me a simple repro, and I'll have a look.

Share this post


Link to post
Share on other sites

I have uploaded a new version that will now support resistance/independent sides, as well as any sides that have been modified via setFriend.

(As you can see on the screenshot below, where east continues their normal patrol behavior, even though a western unit is right next to them.)

friendly.jpg

It also fixes an issue with the "trigger" options that gives you a message and removes the marker when the area was cleared.

http://kronzky.info/ups

Share this post


Link to post
Share on other sites

Any plans about a headlessClient version? There is one out for Arma2 edited from DetrimentalDave i think and it works good.

Share this post


Link to post
Share on other sites

Kronzky,

Can you comment on the issue many have experienced where the enemy AI are in an instant state of agitation (combat behavior) even if they do not know and cannot possibly know that an enemy unit is on the map? It very easy to reproduce. In a previous version of your script, I was able to stop the behavior by commenting out a specific line, but I can't tell you which one right now because I don't have access to the script from where I'm at. Please advise if you can.

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