Jump to content
Sign in to follow this  
Monsada

UPSMON - Urban Patrol Script Mon

Recommended Posts

heya m8 your best bet is to just take a look at the commands it shows all the different examples..

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

---------- Post added at 12:15 PM ---------- Previous post was at 12:14 PM ----------

player in thislist detects player and just this is default..

---------- Post added at 12:19 PM ---------- Previous post was at 12:15 PM ----------

so i got aother idea now that im looking at the arty script. lolz sorry

so instead of KRON_UPS_ARTILLERY_WEST_FIRE = true;

KRON_UPS_ARTILLERY_WEST_FIRE_smoke = true; and instead of getting the target pos of known enemy get target pos of its own move pos...

---------- Post added at 12:31 PM ---------- Previous post was at 12:19 PM ----------

heres a list of arty names that should work with this arty script

m119 usmc arty=========

ARTY_Sh_105_HE

ARTY_Sh_105_WP

ARTY_Sh_105_SADARM

ARTY_Sh_105_LASER

ARTY_Sh_105_SMOKE

ARTY_Sh_105_ILLUM

D30===================

ARTY_Sh_122_HE

ARTY_Sh_122_WP

ARTY_Sh_122_SADARM

ARTY_Sh_122_LASER

ARTY_Sh_122_SMOKE

ARTY_Sh_122_ILLUM

m252 usmc mortar======

ARTY_Sh_81_HE

ARTY_Sh_81_WP

ARTY_Sh_81_ILLUM

2b14 mortar=============

ARTY_Sh_82_HE

ARTY_Sh_82_WP

ARTY_Sh_82_ILLUM

mlrs===============

ARTY_R_227mm_HE_Rocket

grad===================

RTY_R_120mm_HE_Rocket

I know all about that stuff but I was wondering what I need to do to get rid of this. I want it to go off whether the player is in it or not. The player may not be anywhere near the trigger in my mission but I want the reinforcements to start simply when the enemy AI see a West group in the trigger area. Mission specific.

Share this post


Link to post
Share on other sites

i got a little concern, when i spawn a group it says they got 10000 respawns even though i didnt add the respawn command..

---------- Post added at 01:25 PM ---------- Previous post was at 01:23 PM ----------

yea m8 soprry i wasnt clear enough

//trigger setTriggerStatements [condition, activation, deactivation]

so just a normal trigger

//trigger to set reinforcement to true==========================

_trgc_4 = createTrigger["EmptyDetector",getMarkerPos "pos1"];

_trgc_4 setTriggerArea[50,50,0,false];

_trgc_4 setTriggerActivation["WEST","PRESENT",false];

_trgc_4 setTriggerStatements["this","

KRON_UPS_reinforcement = true;

",""];

as far as getting the trigger to go when the ai sees the enemy i dunno

---------- Post added at 01:35 PM ---------- Previous post was at 01:25 PM ----------

just wait he said hes gonna add auto reinforcements...

---------- Post added at 01:42 PM ---------- Previous post was at 01:35 PM ----------

so just an update when i didnt add respawn my spawned group automaticly had 10000 respawns, then i added ,"respawn:",1 and walah....only 1 respawn..

mypoint is troops without respawn command but with spawned command shouldnt have any respawns..

Edited by {Op4}Bsilenced

Share this post


Link to post
Share on other sites

Using a lot of AI UPSMON squads fighting eachother, I still sometimes get some of them "stuck" even though they are not engaging anything. In fact, they did not even reach the patrol area where they got stuck. They just stopped somewhere on the way when they had contacts and hadn't moved since (while other UPSMON squads are moving in, fighting and dying, and the original squad *still* doesn't move a tiny bit). This is for a rather long time (at least 10 minutes if not 20+) before the mission was over.

Share this post


Link to post
Share on other sites

In upsmon.sqf is a litle description for using artillery.

Is so symple, puts this on init of your virtual artillery (must have gunner seat)

nul=[this] execvm "scripts\UPSMON\MON_artillery_add.sqf";

And thats it all, only you need is to use it when you want in your mission, how?

such as reinforcement, putin the var to true, KRON_UPS_ARTILLERY_EAST_FIRE = true; for example to make east artilleries to fire.

Where they fire?

They will fire on known enemies if in range of artillery, by default is 800m.

By this way you can add all artilleries you want to static.When gunner is dead or static weapon artillery will not fire.

Artillery suppor implemented in BETA 5

http://dev-heaven.net/issues/9831

KRON_UPS_ARTILLERY_EAST_FIRE = false; "for doing Artilleries to fire on known targets position

KRON_UPS_ARTILLERY_WEST_FIRE = false; "for doing Artilleries to fire on known targets position

KRON_UPS_ARTILLERY_GUER_FIRE = false; "for doing Artilleries to fire on known targets position

Created a function for adding an artillery to ARMY

nul=[this] execvm "scripts\UPSMON\MON_artillery_add.sqf";

nul = [this,rounds,range,area,mincadence,maxcadence,bulle t] EXECVM "SCRIPTS\UPSMON\MON_artillery_add.SQF";

// <- _artillery: object to attach artillery script, must be an object with gunner.

// <- (_rounds): rounds to fire each time, default 1

// <- (_range): range of artillery, default 800

// <- (_area): Dispersion area, 150m by default

// <- (_maxcadence): Cadence of fire, is random between min, default 10s

// <- (_mincadence): Minimum cadence, default 5s

// <- (_bullet): class of bullet to fire, default ARTY_Sh_81_HE

Artillery will check if known target position has a friendly squad near, if has will no fire.

If no gunner or dead, artillery will stop of fire.

How to use it:

1-Add nul=[this] execvm "scripts\UPSMON\MON_artillery_add.sqf"; to a static weapon. put with gunner or put a "fortify" squad near to take control of artillery.

2-Create a trigger for set artillery var to true KRON_UPS_ARTILLERY_EAST_FIRE = true; when you want to fire or set to false when you want to cease of fire.

Download beta 5 with sample of artillery:http://dev-heaven.net/attachments/do...tes_Beta_5.rar

---------- Post added at 07:38 PM ---------- Previous post was at 07:34 PM ----------

i got a little concern, when i spawn a group it says they got 10000 respawns even though i didnt add the respawn command..

---------- Post added at 01:25 PM ---------- Previous post was at 01:23 PM ----------

yea m8 soprry i wasnt clear enough

//trigger setTriggerStatements [condition, activation, deactivation]

so just a normal trigger

//trigger to set reinforcement to true==========================

_trgc_4 = createTrigger["EmptyDetector",getMarkerPos "pos1"];

_trgc_4 setTriggerArea[50,50,0,false];

_trgc_4 setTriggerActivation["WEST","PRESENT",false];

_trgc_4 setTriggerStatements["this","

KRON_UPS_reinforcement = true;

",""];

as far as getting the trigger to go when the ai sees the enemy i dunno

---------- Post added at 01:35 PM ---------- Previous post was at 01:25 PM ----------

just wait he said hes gonna add auto reinforcements...

---------- Post added at 01:42 PM ---------- Previous post was at 01:35 PM ----------

so just an update when i didnt add respawn my spawned group automaticly had 10000 respawns, then i added ,"respawn:",1 and walah....only 1 respawn..

mypoint is troops without respawn command but with spawned command shouldnt have any respawns..

:p is the message only, will do no respawn, I will correct it.

yes if "respawn" takes 10000 by default. If "respawn:x" takes x respawns availables, if no "respawn" parameter will have no respawns

Share this post


Link to post
Share on other sites

Hi Monsada

sorry for my English, but it's not my native language..

I have some doubts about awesome characteristic " KRON_UPS_sharedist".

I make this question because during a mission (using the utility "knowsabout_debug.sqf"), I get a hint saying the first enemy leader that has spotted me "knowsabout me (player) > 1", while the second group leader (called as reinforcement from the first and not far from him) "knowsabout" me (player) 0" (none).

So it seems that between the two enemy leaders there has been no exchange of information...

How is this gap possible?

The second leader should have the same information passed from the first, because they are close to each other..

Or am i forgetting something about this issue?

Cheers

p.s.

I'm using default settings.

Edited by fideco

Share this post


Link to post
Share on other sites

Knowsabout tell if npc have seen target.

UPSMON use radio, so when shared enemies only share known position. this means that when squad 1 see target tell squad 2 the position he has seen target and squad goes to that position. Squad has no real knowlegde of target until he arrives and see it

Share this post


Link to post
Share on other sites

Is there any way to actually know the "last seen" position? Checking the knowsabout value and then if it's high enough getting the exact position is kinda bad as the value stays high for a long time after the target is out of sight. The AI definitely save somewhere the "last positions" where they've seen enemies/friendlies (seen when you play on recruit/regular difficulties on your map), but I don't know of any way to access those positions with scripts.

Share this post


Link to post
Share on other sites

you can use querytargets or neartargets both returns an array with known positions

Share this post


Link to post
Share on other sites

I still don't see how to get artillery to work. Placing a manned Russian mortar and setting KRON_UPS_ARTILLERY_EAST_FIRE = true; at init_upsmon.sqf (instead of false) and the mortar would never fire, even when I was more than 500m away from nearest enemy and they were shooting at me so they knew where I was.

Is there anything else that needs to be done in order to make mortars fire?

Even in your test mission I didn't see any artillery firing other than the cannons doing direct fire...

Share this post


Link to post
Share on other sites

you have put this on your mortar?

nul=[this] execvm "scripts\UPSMON\MON_artillery_add.sqf";

The mortar has gunner? if no gunner no fire

There are known enemies?

If no enemies no fire

There are friendly forces near?

If friendly forces near no fire.

Are so close or so far?

If closeenough or out of range no fire

Share this post


Link to post
Share on other sites

I used the artillery module to fire at closer targets. The enemy knew about me because they were shooting at me. The mortar had a gunner. The mortar was added with nul=[this] execvm "scripts\UPSMON\MON_artillery_add.sqf"; (line placed in the manned mortar's init line).

How are you determining whether something is too close? Maybe it thinks I am too close even though it should be able to fire at me? Or maybe one of the patches changed mortar minimum range?

Anyway, if the example mission could have a clearly working mortar call that would be nice, because in yours I didn't see it working either (but also no units have nul=[this] execvm "scripts\UPSMON\MON_artillery_add.sqf"; in the init line in your demo mission).

Share this post


Link to post
Share on other sites
I used the artillery module to fire at closer targets. The enemy knew about me because they were shooting at me. The mortar had a gunner. The mortar was added with nul=[this] execvm "scripts\UPSMON\MON_artillery_add.sqf"; (line placed in the manned mortar's init line).

How are you determining whether something is too close? Maybe it thinks I am too close even though it should be able to fire at me? Or maybe one of the patches changed mortar minimum range?

Anyway, if the example mission could have a clearly working mortar call that would be nice, because in yours I didn't see it working either (but also no units have nul=[this] execvm "scripts\UPSMON\MON_artillery_add.sqf"; in the init line in your demo mission).

beta 4, beta 5, beta 6 all of this have implemented artillery.

Your problem is that your artillery is closeenough, 300 meters to target.

Share this post


Link to post
Share on other sites

Nah, it's 1km away from me and the enemies are 600m away.

On an unrelated note, it would be nice if in areas with a lot of enter-able buildings the AI would enter them a lot more than they do currently.

Edited by galzohar

Share this post


Link to post
Share on other sites

im a total noob at scripting. i want a marine patrol to enter a city from 1 side and a russian 1 from the other and have them patrol till they cross paths and then fight.

wut do i put in their leaders init fields?

Share this post


Link to post
Share on other sites
im a total noob at scripting. i want a marine patrol to enter a city from 1 side and a russian 1 from the other and have them patrol till they cross paths and then fight.

wut do i put in their leaders init fields?

Create a rectangular mark on the city named for example "city".

Then put this in both squads:

nul=[this,"city", "delete:",300] execVM "scripts\upsmon.sqf";

Share this post


Link to post
Share on other sites

i sense that with zeus skills and this script, 2 ai armies could be programmed to have an exciting battle to watch

Edited by THEBLITZ6794

Share this post


Link to post
Share on other sites

I am getting this error everytime when loading a savegame in my SP mission (does it look familiar. Or is it coming from unknown source :) ) :

if (_GetIn_NearestVehicles || _npc != vehicle (_npc)) then {
_membe>
 Error position: <|| _npc != vehicle (_npc)) then {
_membe>
 Error Generic error in expression
Error in expression <g=false;
};

The error disapeares soon after appearing, but I just wanted to inform you if there is a clear bug in it. I am not using the latest USPMON but some of the newest.

Share this post


Link to post
Share on other sites

Monsada,

If you have ACE2 and Isle Duala can you check this test mission and see what I'm doing wrong. I don't think the reinforcements are working correctly. Or anyone else that understands this script and has ACE2 + Isla Duala if you could take a look I'd appreciate it.

http://www.filefront.com/16023045/@ACE2_UPSMON_Duala_Test.isladuala.pbo

Share this post


Link to post
Share on other sites

what do you espect the reinforcement must do and what is doing?

Share this post


Link to post
Share on other sites

Oops, my apologies for the double post. I didn't see I was the last post. Should've looked. :(

Edited by Manzilla

Share this post


Link to post
Share on other sites

I want them to only come when the PLA soldiers on the map see West troops. That marker is created by the Trigger.sqf. One set of enemy reinforcements are the PLA armor on the map and the others are the ACE2 Insurgents that spawn from the Spawngroup1.sqf. The US soldiers should call their reinforcements when they spot the PLA or ACE2 Insurgent(both Independent side). One set of US reinforcements is the group north of the US held town and the other 2 reinforcements are the AH64 and A10 at the base on the mainland.

EDIT:

Removed. I'm an idiot. It does work. Oops.

Edited by Manzilla

Share this post


Link to post
Share on other sites

You are using "nowp" parameter.

With nowp no waypoints are created. Why do you put "nowp" on spawned squads? Quit "nowp" and all waypoints:

_wp = _grp5 addWaypoint [position A_wp1_4, 0];
_wp setWaypointType "MOVE"; 
_wp setWaypointSpeed "FULL";
_wp setWaypointCombatMode "YELLOW";
_wp setWaypointBehaviour "CARELESS";
_wp setWaypointFormation "FILE";
_wp = _grp5 addWaypoint [position A_wp2_4, 0];
_wp setWaypointType "SAD"; 
_wp setWaypointSpeed "FULL";
_wp setWaypointCombatMode "RED";
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointFormation "WEDGE";

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  

×