Jump to content
Sign in to follow this  
Monsada

UPSMON - Urban Patrol Script Mon

Recommended Posts

Can you please specify what init_upsmon actually does on the client? It seems to only define variables for the upsmon script?

Share this post


Link to post
Share on other sites

//Adding eventhandlers
"KRON_UPS_EAST_SURRENDED" addPublicVariableEventHandler { if (_this select 1) then { nul=[east] execvm "scripts\UPSMON\MON_surrended.sqf";};};
"KRON_UPS_WEST_SURRENDED" addPublicVariableEventHandler { if (_this select 1) then { nul=[west] execvm "scripts\UPSMON\MON_surrended.sqf";};};
"KRON_UPS_GUER_SURRENDED" addPublicVariableEventHandler { if (_this select 1) then { nul=[resistance] execvm "scripts\UPSMON\MON_surrended.sqf";};};
"MON_LOCAL_EXEC" addPublicVariableEventHandler { if (local ((_this select 1)select 0)) then {
	call ( compile format[(_this select 1)select 1,(_this select 1)select 0] );
	};
};

above stuff must be executed on clients or you got problem with surrender functions.

What is does - I'm not sure but this way it's working :)

Edited by Rafalski

Share this post


Link to post
Share on other sites

Ah that explains it, since I never use surrendering anyway (always set it to 0 so they never surrender).

Share this post


Link to post
Share on other sites

Init_uspmon must run on all client because of eventhandlers, but only for that, all resting code only executes on server, so after eventhandlers declaration for all clients, a check of server is executed

//Adding eventhandlers
"KRON_UPS_EAST_SURRENDED" addPublicVariableEventHandler { if (_this select 1) then { nul=[east] execvm "scripts\UPSMON\MON_surrended.sqf";};};
"KRON_UPS_WEST_SURRENDED" addPublicVariableEventHandler { if (_this select 1) then { nul=[west] execvm "scripts\UPSMON\MON_surrended.sqf";};};
"KRON_UPS_GUER_SURRENDED" addPublicVariableEventHandler { if (_this select 1) then { nul=[resistance] execvm "scripts\UPSMON\MON_surrended.sqf";};};
"MON_LOCAL_EXEC" addPublicVariableEventHandler { if (local ((_this select 1)select 0)) then {
	call ( compile format[(_this select 1)select 1,(_this select 1)select 0] );
	};
};


if (!isServer) exitWith {};

Edited by Monsada

Share this post


Link to post
Share on other sites

hi,

Can you know if we can launch upsmon by a script? i tried this but doesn't work :

nul=[loon1,"area0","nowait"] execVM "scripts\upsmon.sqf";

0=[loon1,"area0","nowait"] execVM "scripts\upsmon.sqf";

idea?

i want change during mission the unit's patrol, at strat it patrol in area0 and after a script they patrol in area1

Share this post


Link to post
Share on other sites

I have a question concerning the reinforcement trigger functionality:

KRON_UPSMON_reinforcement1 = "true"; KRON_UPSMON_reinforcement1_pos = getmarkerpos "town";

Does all of that go in the Condition, or the On Activation in the trigger?

Or does the first half go in the condition, while the position command goes in the On Activation? And is the above code actually correct for a group with nul=[this,"town","randomdn","reinforcement:"1] execVM "scripts\upsmon.sqf"?

I'm pretty sure that the squad leader init code is right, but the trigger codes--it just didn't seem intuitive to put the entire line in either the condition or the On Act. So I ask: What is the correct way to load the reinforcement trigger?

Thank you.

Edited by tod
spelling

Share this post


Link to post
Share on other sites

on-act is what you want to do when the trigger is activated, in your case set KRON_UPS_reinforcement1 (btw I think it's UPS and not UPSMON here, you should check though since this is off of memory), and set the reinforcement position.

Condition is what tells the trigger WHEN to activate, which should depend on what you want to do in your mission. Usually condition will just have this, for using the default trigger conditions (such as "bluefor present", "detected by opfor" or "seized by independent"), but you could also use other conditions as you wish, such as !alive soldier1 or {side _x == EAST && alive _x} count allUnits < 50 or whatever.

Share this post


Link to post
Share on other sites

How do you get 'ambush' to work on light vehicles?the mine does not explode when Humvees pass over it and the ambushing guys do not react to the Humvee.

Share this post


Link to post
Share on other sites

^I could swear i read a couple of posts back that mines explode only when armored vehicles (tanks and such) trigger them--a bug or something.

Edited by tod

Share this post


Link to post
Share on other sites

They explode when tracked vehicles[i tested M113] hit them, but not when Humvees or soft skin vehicles hit them...I was literally going back and further with the wheel on the mine and it did nothing while the ambushing ais were just looking at me.

Not sure if its from vanilla, but I play with ACE exclusively.

I tested ambush2 and the AI do not react to vehicles at all, I think something is broken - I was standing infront of the AIs with my Humvee and they did nothing even that they have 3 RPGs.

I started running them over one by one and again - they did nothing...they continued laying prone without moving as I was running them over :(

Share this post


Link to post
Share on other sites

thank you galzohar and Lonestar.

You were right Galzohar about the KRON_UPS...; I added the MON out of habit I guess.

Does: {side _x == EAST && alive _x} count allUnits < 50 do something similar to count thislist <=50? And if so, do the x' have to be replaced with a specific object?

---------- Post added at 01:11 PM ---------- Previous post was at 01:06 PM ----------

They explode when tracked vehicles[i tested M113] hit them, but not when Humvees or soft skin vehicles hit them...I was literally going back and further with the wheel on the mine and it did nothing while the ambushing ais were just looking at me.

Not sure if its from vanilla, but I play with ACE exclusively.

I tested ambush2 and the AI do not react to vehicles at all, I think something is broken - I was standing infront of the AIs with my Humvee and they did nothing even that they have 3 RPGs.

I started running them over one by one and again - they did nothing...they continued laying prone without moving as I was running them over :(

I've never used ambush, but someone in a previous post also said that placing the ambushing units too close to the ambush sight will cause them to behave poorly, or not at all. There is code in UPSMON that sets an ambush safeDistance variable or something. there's a perfect ambush number, in meters, that has to be considered, and I can't remember what that number is, like 50 meters or something.

Edited by tod

Share this post


Link to post
Share on other sites

I love this script, and use alot. However, is it just me that can't change the view distance when using this?

I did some searching, but it didn't come up with anything useful...

Share this post


Link to post
Share on other sites

Does: {side _x == EAST && alive _x} count allUnits < 50 do something similar to count thislist <=50? And if so, do the x' have to be replaced with a specific object?

http://community.bistudio.com/wiki/count

Basically what I wrote will count all units that are both EAST and alive (it basically iterates over allUnits and for each of them checks if _x (the current unit in iteration) is both EAST and alive. You could of course replace allUnits with thislist to only get units that match the trigger's condition (and if the trigger is only activated by east anyway, you don't need the side _x == EAST check, since all units in thislist will be east anyway). It all depends on what you actually want to be the condition for the reinforcements.

Share this post


Link to post
Share on other sites

@glazohar: Ah, get it. Your code does not depend on the hardcoded trigger conditions.

@Proud Gamer: this is just what I suspect, but, in the UPSMON init that goes in your missions folder (the separate one that has the dialog that you delete if you don't want to run the sample mission) there is the setting

{view distance 1800}

or something like that. YOu may have to change or delete it there. Again, I haven't tried this myself; I just noticed the code.

Share this post


Link to post
Share on other sites
@glazohar: Ah, get it. Your code does not depend on the hardcoded trigger conditions.

@Proud Gamer: this is just what I suspect, but, in the UPSMON init that goes in your missions folder (the separate one that has the dialog that you delete if you don't want to run the sample mission) there is the setting

{view distance 1800}

or something like that. YOu may have to change or delete it there. Again, I haven't tried this myself; I just noticed the code.

Thank you. I was actually in that file poking around earlier but I have no idea how I missed that. Thanks mate ;)

Share this post


Link to post
Share on other sites

How do you adjust (change) the patrol zone of a unit DURING a mission.

Say I have a Blufor unit, running security for my takedown unit. I want them in one zone at the start of the mission. But need them to patrol / clear another spot later on during the mission.

Is there a way I can quickly / easily adjust the patrol zone. Simply move zone "alpha" to another spot on the map for example.

Share this post


Link to post
Share on other sites
How do you adjust (change) the patrol zone of a unit DURING a mission.

Say I have a Blufor unit, running security for my takedown unit. I want them in one zone at the start of the mission. But need them to patrol / clear another spot later on during the mission.

Is there a way I can quickly / easily adjust the patrol zone. Simply move zone "alpha" to another spot on the map for example.

in current version of UPSMON can not be changed, but you can try reinforcement spot instead.

You can set a position to go when reinforcement is demanded. It Only can be done especifying groups of reinforcement. When you call for especific reinforcement you can especify a position too.

KRON_UPS_reinforcementx = true;
KRON_UPS_reinforcementx_pos = [0,0,0];

Sample of groups of reinforcement:

1. Create a squad in editor and put this on init:

nul=[this,"airport","reinforcement:",1] execVM "scripts\UPSMON.sqf";

this code will exec upsmon on squad and set as reinforcement id 1.

you cand assign various squads to the same reinforcement id.

2. Create a void mark in map and name it "rfpos1"

3. Execute next code in a trigger or where ever you want

 KRON_UPS_reinforcement1 = true;
     KRON_UPS_reinforcement1_pos = getMarkerPos "rfpos1";

When you set KRON_UPS_reinforcement1= true; reinforcement squad 1 is called for reinforcement and will be sent to position of mark "rfpos1"

Edited by Monsada

Share this post


Link to post
Share on other sites

How do I get rid of the text in the upper right-hand corner that says UPSMON 5.0.9 West East Ref etc...

I can't find where to shut/delete this.

Share this post


Link to post
Share on other sites

Any ideas on my ambush/2 problem?the AI do not react at all to vehicles even that the AIs have RPG7, they let Humvees/trucks/tanks pass through...I even park the vehicle right infront of them and they do not react at all...heck I'm even running over them and they do nothing.

Its on Fallujah map with UPSMON 509.

Share this post


Link to post
Share on other sites

ZZEZ open ticket at DH and provide sample mission to reproduce your problem.

(arma2co maps only)

Share this post


Link to post
Share on other sites
Any ideas on my ambush/2 problem?the AI do not react at all to vehicles even that the AIs have RPG7, they let Humvees/trucks/tanks pass through...I even park the vehicle right infront of them and they do not react at all...heck I'm even running over them and they do nothing.

Its on Fallujah map with UPSMON 509.

make sure your vehicle does not have this setCaptive true in its initline, or player is not the same in init.sqf.

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  

×