Jump to content
Sign in to follow this  
Monsada

UPSMON - Urban Patrol Script Mon

Recommended Posts

Just wondering if this can be used for OA? The files say utes, am not 100% if thats compatible.

Demo mission by author is made on utes(wich requires Arma 2), but upsmon doesnt care what units or wich map its used on.

But if you only have OA, simply just copy all exept the mission.sqm into your mission folder, and use read me to set it up.

Share this post


Link to post
Share on other sites

You actually only need the scripts folder and 1 line in the init.sqf file to get this to work for any mission on any island.

Share this post


Link to post
Share on other sites

Ive run into a problem with upsmon:

after upsmon group has started patrolling the patrolmarker i cannot set an invicible h or marker on patrolmarkers position.

I create a heli, then a invicible h on patrolmarker, then set helis wp on invicible h, heli paradrops upsmon group, heli moves ok.

I run same trigger again, creating a second heli and group, exactly same way with new invicible h, but wp is now set to lowest most left side of map.

this is whats causing the problem i think:

first deployment works with invicible h, then second time AFTER upsmon is started on marker it sets next invicible h to the lowest most left corner of map.

This is what i think is the problem in the upsmon script:

// show area marker 
_showmarker = if ("SHOWMARKER" in _UCthis) then {"SHOWMARKER"} else {"HIDEMARKER"};
if (_showmarker=="HIDEMARKER") then {
//_areamarker setMarkerCondition "false"; // VBS2
_areamarker setMarkerPos [-abs(_centerX),-abs(_centerY)];
};

It sets the marker to some form of absolute value using abs, unsure about the details.

link to bis info on abs : http://community.bistudio.com/wiki/abs

Anyone know a way i can work around this in my heli script without making adjustments to upsmon itself??

1: How to create a marker or invicible h on marker position after scripting above is run on it if script is the reason?

2: how to get position of a upsmon patrol marker that is already in use by another upsmon group?

Edit: Just to mention it, 2nd upsmon groups patrol marker in correct position, so they somehow gets the correct position even tho first group made problems for the heli wps.

Regards

Edit: Problem has been resolved

Solution is to use setMarker alpha on markers and use "showmarker" in upsmon goups init lines.

Edited by Demonized
problem solved

Share this post


Link to post
Share on other sites

UPSMON moves the markers a bit after the script starts. You should use other markers for non-USPMON-related purposes. Took me a while to figure this out when I had similar issues.

Share this post


Link to post
Share on other sites

yeah i have an extra set of markers placed manually on center of each patrol marker, that works, but its an extra hassle to do it, i would like to make my script work alone with only patrol marker, but guess ill have to live with the extra markers for awhile.

Edit: Content deleted, buggy solution.

The working solution...... im almost sad to say... is to use

"markername" setMarkerAlpha 0;

on upsmon markers and then activate "showmarker" in every upsmon group initline, wich basicallyt leaves markers as normal without changing them, and setMarkerAlpha hides them from the start so all working ok, even wp, etc... lol, simple solution is often the best.

Edited by Demonized

Share this post


Link to post
Share on other sites

Ok I do love this mod But I need to know If I am running Zeus and SLX and GL4 for my AI will this work ok with that stuff to or no?

Is there alot of things I shouldnt run within the mod? Should I not use it?

Share this post


Link to post
Share on other sites

I've tried upsmon with Zeus and had some strange results, e.g. AI spinning around doing nothing so now I just use upsmon and I'm pretty happy with the outcome.

Zeus creator says that there's no conflict but some commands do overlap and so get duplicated. You'll also get more stress on the cpu too.

Anyways, I'm curious what other people have observed.

Share this post


Link to post
Share on other sites

Zeus worked nicely with upsmon, but the heavy cpu use in large battles is there.

Make sure to use a cache system and even your big maps should work ok.

else upsmon works quite nicely on its own.

here is cache units script, very easy and nice.

http://www.armaholic.com/page.php?id=2019

Share this post


Link to post
Share on other sites

I'm liking how this is working, but I've got a bit of a problem that I hope is nothing major.

I've assigned patrol areas to enemy AI, then when i play the mission I keep getting scrolling text to the lower left saying

"New Instance" or "Patrol to new position" etc. I also get some sort of table in the upper right of the screen upon start up. Does anyone know what these are and how to turn them off?

Share this post


Link to post
Share on other sites

open init_UPSMON.sqf and in top there is this line:

KRON_UPS_Debug = 1;

set that to 0 instead of 1 to turn of debug messages. also you should change those three markers color red and blue for flanking etc to empty markers.

Share this post


Link to post
Share on other sites

Thanks Demonized. Spent ages googling for it and never realised it was on the first page of this thread...oops.

Thanks again :)

Share this post


Link to post
Share on other sites

I have grouped about 5 amour vehicles together and made them template 1 they all spawn fine however my problem is that they all get out and leave there vehicles ? how can i get them to say in there vehicles and patrol ?

what am i doing wrong ?

nul=[this,"marker_patrol","delete:",600,"template:",1] execvm "scripts\UPSMON.sqf";

ul = [1,getMarkerPos "marker_patrol",3,["marker_patrol","random","move","spawned","delete:",400]] execVM "SCRIPTS\UPSMON\MON_SPAWN.SQF

Share this post


Link to post
Share on other sites

I think it's the "random" part. What seems to happen is that they will spawn outside of vehicle, and then get randomly placed in the marker area but the vehicles get left behind. If you don't use the "random" parameter, they will run about for a bit, but most of the time they will then return to their vehicles and drive around.

What I have done is separate my infantry groups from my vehicle groups, and apply the random bit to the infantry only. If you want to help spread them out a bit in different places of your marker area, just drop an object down (like a small can), and have one group spawn in one place, and another group spawn in another place. For example...

crbsquad3 = true; nul = [1,position can3,4,["monsquad_mrkr3", "random", "move", "nofollow","respawn"]] execVM "SCRIPTS\UPSMON\MON_SPAWN.SQF"; nul = [2,position can3b,2,["monsquad_mrkr3", "move", "nofollow"]] execVM "SCRIPTS\UPSMON\MON_SPAWN.SQF";

Template 1 is infantry only, and they will be randomized after spawning at "can3". Template 2 is vehicular groups that will patrol the area after respawning at "can3b".

( the crbsquad3 = true bit isn't what you asked about, but it's just another way to 'randomize' things, and toss more into the mix. I have a crbsquad3_spawn.sqf that looks like this

waitUntil { crbsquad3 }; 

0 = [position crbsquad3_logic, "Infantry", 700, ["BIS_TK_INS"]] execVM "crB_scripts\crB_taskPatrol.sqf";

0 = [position crbsquad3_logic2, "Infantry", 700, ["BIS_TK_INS"]] execVM "crB_scripts\crB_taskPatrol.sqf";

That example just happens to be 2 infantry groups, but one of them could be Motorized, or Armored, or Mechanized. crbsquad3_logic and logic2 are game logics. crbsquads are from http://forums.bistudio.com/showthread.php?t=92480 )

Share this post


Link to post
Share on other sites

Many thanks will give that a go tonight , also Many thanks for the crbsquad3 = true tip i use crB_taskPatrol.sqf with a game logic but now now how to call it when i need it !

Cheers

Share this post


Link to post
Share on other sites
Zeus worked nicely with upsmon, but the heavy cpu use in large battles is there.

Make sure to use a cache system and even your big maps should work ok.

else upsmon works quite nicely on its own.

here is cache units script, very easy and nice.

http://www.armaholic.com/page.php?id=2019

How does this script work exactly? Is it mainly for enemy AI (and you just put that script within the Team leader's INT: file?).

Share this post


Link to post
Share on other sites

It is for AI, yeah, not players ;)

You need to both initialize the initialization script once (say, in init.sqf, similar to how the demo mission has it), and then start the actual script for every patrol group, for example by typing the appropriate line into each group leader's init line (ex: hNil = [this, "patrolmarker1"] execVM "scripts\UPSMON.sqf";).

Share this post


Link to post
Share on other sites
How does this script work exactly? Is it mainly for enemy AI (and you just put that script within the Team leader's INT: file?).

If you meant how cache script works:

Then its started in init.sqf and will automatically work on any AI group in mission, even when they are spawned in during mission, no need to put anything in units initline for cache.

You determine a range from player that they would spawn/despawn.

I usually on big open maps, like takistan use 2000 or 2500, for fallujah wich is more close quarters i use 1000 ish.

It deletes all units exept leader in group.

So now when ANY player is within set range group will spawn in on leader pos and continue what they was doing.

example: you put down 500 units in 25 groups(20 AI in each group)

cache is enabled and now you only have 25 units the machine has to work with, you come into reach of 2 of the groups and machine has to work with 38 more units (19 in each group is now spawned on leader, 20 in each group total) all other groups that are out of specified range is still only 1 unit.

For zeus its an addon wich automatically adjusts how AI beheaves, nothing else needed. beware zeus can be hardware hungry if big mission, but its very nice if you have the hardware for it, AI lays down supresing fire, and much much more. Zeus gets rid of the 1 shot 1k away is headshot with handgun thing. much more bullets fired now. recomend trying it out with a few groups, combined with UPSMON as well is very nice.

Edited by Demonized

Share this post


Link to post
Share on other sites
There's no point of AI using flares as they do not benefit from them. The only one who benefits from flares are human players. When it comes to lighting conditions, AI detection seems to be strictly dependent on date and time of day (and island).

If that's true then I am sure they can see through the trees and grass as well? there are no parameters for the AI within the code to make them horribly accurate? If they don't need light then that's not good AI imho

Share this post


Link to post
Share on other sites

Well bushes and trees are simulated on some level. Ambient light (moonlight basically, doubt anything else is) is simulated to a degree. Other things such as dynamic lights (flares, flashlights) have no effect. Yes AI in Arma 2 is limited, but just think about AI in other games for a sec here and you'll see it's not all that bad in comparison...

Share this post


Link to post
Share on other sites
If that's true then I am sure they can see through the trees and grass as well? there are no parameters for the AI within the code to make them horribly accurate? If they don't need light then that's not good AI imho

Well regarding flares, i was pretty surprised when i learned it was just eyecandy for players.

AI reacts to known enemy, so if you as player shoot at 1 AI member of a group and dont kill him at first, he will share your location with his group, thereby all of the group can "SEE" you, even when in pitchdark for as long as it takes for the units knowsabout value to go down, wich is a few mins.

For proper flares for AI with actual AI light, look in my sig, it works both in MP and SP, and for A2, OA, or CO.

Regarding bushes and threes, there is AI viewblocks similar size of object youre hiding behind, but it appears viewblocks are impacted by the knowsabout value, so if you are spotted and engaged, AI will still shoot through the viewblock for as long as it takes knowsabout value to go down.

edit: But you can most of the time sneak up on enemy by being behind a bush or three.

Edited by Demonized

Share this post


Link to post
Share on other sites
Demon, I tried altering the stuff you mentioned. For some reason, I can't get this to work:

_sMarker = this select 0;

_sObj1 = this select 1;

_sObj2 = this select 2;

_sTrig = this select 3;

{

_sMarker setMarkerPos getMarkerPos _sObj1;

IF triggeractivated _sTrig THEN

{

_sMarker setMarkerPos getMarkerPos _sObj2;

};

};

With or without quotes around _smarker and _sobj, it doesn't want to work. That is, the SCRIPT works. The patrol, however, does not follow the marker to its new location.

I have the same problem without any solution I'm afraid. I've tried moving the marker and I've tried giving them a new init-line but nothing works. Well moving the marker works, but they keep running back and forth between where the marker was and where it is now. So with some distance between the "was" and "is" they keep running back and forth. They do make it after a while but as you can understand, it takes forever.

Giving them a new init-line with the new marker just gives them a new instance so now they're member of two instances and that's really chaotic.

Share this post


Link to post
Share on other sites

@Rekrul

UPSMON alters markers when in use, it moves them.

Use "showmarkers" parameter in upsmon groups init.

And use markerAlpha method to make patrol markers work as normal while still being invicible.

markerAlpha method works great.

from SKAJolly previous post:

Demonized, are you sure the standard version doesn't work? I've played UPSMON in MP many times now, and they never show in the map screen if you do as follows:

In editor, make a game logic. In init, put

_anyName = [] execVM "scripts\markerAlpha.sqf" - so long as you have a folder with the script in it.

Make a markerAlpha.sqf with wordpad in the correct folder. In here, for each marker name, put

"markerName" setMarkerAlpha 0;

continue until all markers are done.

This seems to eradicate the problem whereby putting the same lines in the init.sqf, some markers still showed visible in some screens, for some time.

Last edited by SCAJolly; 11-25-2010 at 07:12 PM. Reason: changed "game" for "editor"

Share this post


Link to post
Share on other sites

So if I tell UPSMON to not hide the markers, I can actually move them around and it'll have an effect? Or what? I still haven't figured out exactly how moving markers works with this.

Share this post


Link to post
Share on other sites
@Rekrul

UPSMON alters markers when in use, it moves them.

Use "showmarkers" parameter in upsmon groups init.

And use markerAlpha method to make patrol markers work as normal while still being invicible.

markerAlpha method works great.

from SKAJolly previous post:

I don't get it. That's just to make the markers invisible, not how to move them (and have UPSMON react to it). What I want is to first attack one area, then another.

I tried with both visible and invisible markers to no effect.

I also tried making the survivors joining a new instance but they still keep their original instance from the init-field so that really confuses them.

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  

×