Jump to content
Sign in to follow this  
Monsada

UPSMON - Urban Patrol Script Mon

Recommended Posts

I'm also trying to get rid of the counter in the top right corner, it's appearing in my mission. And it seems the player keeps calling out radio messages that I believe are in regards to the friendly AI doing patrols. I can't figure out how to disable that either. I'm gonna re-check this thread but I couldn't find anything about this at first glance.

I did get the basic patrol set up and damn the patrol well. Gotta try the other stuff as I figure it out more.

Excellent job!

EDIT:

Hmmm, I finally think I understand a lot of the conversation going on here about various things in this script. Let's hope I can implement them now. ;)

I'm sure I'll be back with some other dumb questions soon.

Edited by Manzilla

Share this post


Link to post
Share on other sites

Don't worry guys, is a beta work so mission test is... I would like to have a litle more time to do a wiki of all features, but by now is imposible.

New Beta 7

Well I added RESPAWN:X so you can tell how many times squad can respawn. Added a control for avoiding respawn if targets near too.

Improved a little performance and resolved some bugs detected.

http://dev-heaven.net/projects/upsmon/files

Share this post


Link to post
Share on other sites
I created an issue on dev-heaven for the "AI gets spewed out of vehicle": http://dev-heaven.net/issues/9879

I executed your mission and I canot reproduce it, Upsmon is not executing. I need to do something to become executed UPSMON?

Share this post


Link to post
Share on other sites

Thanks Monsada! I was working on something as well but I'm still learning it.

One question:

I'm trying to spawn a group that uses this and will come as reinforcements when a trigger is activated.

Right now I have a trigger placed that calls the script when BLUFOR AI are present.

Here's the script that spawns the group(The script call I tried is in bold):

_grp5 = [position Insgroup4, resistance,["ACE_Ins_2_8", "ACE_Ins_2_1", "ACE_Ins_3_2", "ACE_Ins_1_4", "ACE_Ins_2_7", "ACE_Ins_1_2", "ACE_Ins_3_10", "ACE_Ins_2_5", "ACE_Ins_2_2"]] call BIS_fnc_spawnGroup;
_grp5 = GroupInd5
[b]call {[GroupInd5, "PLA1","move","random","noslow","nowp","reinforcement","track"] execVM "scripts\upsmon.sqf"};[/b]
_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";

Unfortunately the team spawns but doesn't move and I don't think the script call is working since they spawn group isn't "tracked". Basically the group spawns at an invisible H named "Insgroup4" and is supposed to move to wp's "A_wp1_4" and "A_wp2_4" when the other enemy who's moving towards it's wp spots the BLUFOR AI in the town. Their area is a marker named "PLA1" and I'm using the "nowp" parameter to make them move through the zone using a SD wp that's manually placed on the map. This group's init line is:

nul=[this, "PLA1", "nowp", "delete:", 15, "track", "noslow"] execVM "scripts\upsmon.sqf";

Any idea why the spawned group isn't using UPSMON? I think my script call code is wrong.

Share this post


Link to post
Share on other sites
I executed your mission and I canot reproduce it, Upsmon is not executing. I need to do something to become executed UPSMON?

Yes. Use the "unload" action you get on the AAV. The whole idea was executing UPSMON during the mission rather than at the start.

Share this post


Link to post
Share on other sites
Thanks Monsada! I was working on something as well but I'm still learning it.

One question:

I'm trying to spawn a group that uses this and will come as reinforcements when a trigger is activated.

Right now I have a trigger placed that calls the script when BLUFOR AI are present.

Here's the script that spawns the group(The script call I tried is in bold):

_grp5 = [position Insgroup4, resistance,["ACE_Ins_2_8", "ACE_Ins_2_1", "ACE_Ins_3_2", "ACE_Ins_1_4", "ACE_Ins_2_7", "ACE_Ins_1_2", "ACE_Ins_3_10", "ACE_Ins_2_5", "ACE_Ins_2_2"]] call BIS_fnc_spawnGroup;
_grp5 = GroupInd5
[b]call {[GroupInd5, "PLA1","move","random","noslow","nowp","reinforcement","track"] execVM "scripts\upsmon.sqf"};[/b]
_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";

Unfortunately the team spawns but doesn't move and I don't think the script call is working since they spawn group isn't "tracked". Basically the group spawns at an invisible H named "Insgroup4" and is supposed to move to wp's "A_wp1_4" and "A_wp2_4" when the other enemy who's moving towards it's wp spots the BLUFOR AI in the town. Their area is a marker named "PLA1" and I'm using the "nowp" parameter to make them move through the zone using a SD wp that's manually placed on the map. This group's init line is:

nul=[this, "PLA1", "nowp", "delete:", 15, "track", "noslow"] execVM "scripts\upsmon.sqf";

Any idea why the spawned group isn't using UPSMON? I think my script call code is wrong.

for runing upsmon you need to execute it on leader not in group. so first parameter must be the leader of group, not the object group, try to get first soldier of group

call {[(units GroupInd5) select 0 , "PLA1","move","random","noslow","nowp","reinforcement","track"] execVM "scripts\upsmon.sqf"};

Share this post


Link to post
Share on other sites

i use this

GroupSquad1 = CreateGroup resistance;

_leader1 = GroupSquad1 createUnit ["ACE_Ins_2_1", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad1 createUnit ["ACE_Ins_2_2", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad1 createUnit ["ACE_Ins_2_3", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad1 createUnit ["ACE_Ins_2_4", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad1 createUnit ["ACE_Ins_2_5", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad1 createUnit ["ACE_Ins_2_6", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad1 createUnit ["ACE_Ins_2_7", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad1 createUnit ["ACE_Ins_2_8", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad1 createUnit ["ACE_Ins_2_9", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad1 createUnit ["ACE_Ins_2_10", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_leader1 = leader GroupSquad1;

[ _leader1, _SpawnPos, "fortify", "delete:", 600] execVM "scripts\UPSMON.sqf";

should i be using the call command too?

Share this post


Link to post
Share on other sites

CALL or execvm is the same, best if you can call because do not need to compile another time the script. so you can use call upsmon instead execvm if run in script

UPSMON is compiled on init in UPSMON var:

[ _leader1, _SpawnPos, "fortify", "delete:", 600,"spawned"] call UPSMON;

DO NOT FORGOT to add "spawned" in all squads created dinamically by script.

Edited by Monsada

Share this post


Link to post
Share on other sites

i havnt got spawned to work in the way i spawn groups..

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

heres the whole script, notice im using binesi patrol for my patrol squads? that because i havnt got ups patrol to work properly with spawned groups..

if(!isServer) exitWith{};

private ["_type", "_group", "_SpawnPos", "_leader1", "_unit", "_leader2", "_grp", "_leader3", "_leader4", "_leader6", "_leader7",

"_leader8", "_leader9", "_leader10", "_leader11", "_leader12", "_leader13", "_leader14", "_leader15", "_leader16", "_leader17",

"_leader18", "_leader19"];

_group = toLower (_this select 0); //the makeup of group

_SpawnPos = toLower (_this select 1); //spawn position of group and patrol pos

switch (_group) do

{

// 12 man insurgents fortify

case "insf10":

{

GroupSquad1 = CreateGroup resistance;

_leader1 = GroupSquad1 createUnit ["ACE_Ins_2_1", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad1 createUnit ["ACE_Ins_2_2", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad1 createUnit ["ACE_Ins_2_3", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad1 createUnit ["ACE_Ins_2_4", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad1 createUnit ["ACE_Ins_2_5", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad1 createUnit ["ACE_Ins_2_6", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad1 createUnit ["ACE_Ins_2_7", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad1 createUnit ["ACE_Ins_2_8", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad1 createUnit ["ACE_Ins_2_9", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad1 createUnit ["ACE_Ins_2_10", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_leader1 = leader GroupSquad1;

[ _leader1, _SpawnPos, "fortify", "delete:", 600] execVM "scripts\UPSMON.sqf";

};

//12 man insurgents reinforcement

case "insr10":

{

GroupSquad2 = CreateGroup resistance;

_leader2 = GroupSquad2 createUnit ["ACE_Ins_3_1", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad2 createUnit ["ACE_Ins_3_2", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad2 createUnit ["ACE_Ins_3_3", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad2 createUnit ["ACE_Ins_3_4", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad2 createUnit ["ACE_Ins_3_5", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad2 createUnit ["ACE_Ins_3_6", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad2 createUnit ["ACE_Ins_3_7", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad2 createUnit ["ACE_Ins_3_8", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad2 createUnit ["ACE_Ins_3_9", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad2 createUnit ["ACE_Ins_3_10", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_leader2 = leader GroupSquad2;

[ _leader2, _SpawnPos, "move", "delete:", 300, "reinforcement"] execvm "scripts\UPSMON.sqf";

};

//12 man insurgents TaskPatrol

case "insp10":

{

GroupSquad5 = CreateGroup resistance;

_grp = GroupSquad5 createUnit ["ACE_Ins_3_1", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad5 createUnit ["ACE_Ins_3_2", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad5 createUnit ["ACE_Ins_3_3", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad5 createUnit ["ACE_Ins_3_4", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad5 createUnit ["ACE_Ins_3_5", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad5 createUnit ["ACE_Ins_3_6", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad5 createUnit ["ACE_Ins_3_7", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad5 createUnit ["ACE_Ins_3_8", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad5 createUnit ["ACE_Ins_3_9", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad5 createUnit ["ACE_Ins_3_10", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_grp = leader GroupSquad5;

_grp setVehicleInit "null = [group this,(getPos this), 250] execVM ""scripts\BIN_taskPatrol.sqf""; ";

processInitCommands;

};

//5 man insurgents Fortify

case "insf5":

{

GroupSquad3 = CreateGroup resistance;

_leader3 = GroupSquad3 createUnit ["ACE_Ins_1_1", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad3 createUnit ["ACE_Ins_1_2", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad3 createUnit ["ACE_Ins_1_3", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad3 createUnit ["ACE_Ins_1_4", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad3 createUnit ["ACE_Ins_1_5", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_leader3 = leader GroupSquad3;

[ _leader3, _SpawnPos, "fortify", "delete:", 600] execVM "scripts\UPSMON.sqf";

};

//5 man insurgents Reinforce

case "insr5":

{

GroupSquad4 = CreateGroup resistance;

_leader4 = GroupSquad4 createUnit ["ACE_Ins_2_1", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad4 createUnit ["ACE_Ins_2_2", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad4 createUnit ["ACE_Ins_2_3", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad4 createUnit ["ACE_Ins_2_4", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad4 createUnit ["ACE_Ins_2_5", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_leader4 = leader GroupSquad4;

[ _leader4, _SpawnPos, "move", "delete:", 300, "reinforcement"] execvm "scripts\UPSMON.sqf";

};

//5 man insurgents Task Patrol

case "insp5":

{

GroupSquad6 = CreateGroup resistance;

_leader6 = GroupSquad6 createUnit ["ACE_Ins_3_1", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad6 createUnit ["ACE_Ins_3_2", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad6 createUnit ["ACE_Ins_3_3", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad6 createUnit ["ACE_Ins_3_4", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad6 createUnit ["ACE_Ins_3_5", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_leader6 = leader GroupSquad6;

_leader6 setVehicleInit "null = [group this,(getPos this), 250] execVM ""scripts\BIN_taskPatrol.sqf""; ";

processInitCommands;

};

// 5 man insurgents TaskDefend

case "insd5":

{

GroupSquad7 = CreateGroup resistance;

_leader7 = GroupSquad7 createUnit ["ACE_Ins_3_1", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad7 createUnit ["ACE_Ins_3_2", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad7 createUnit ["ACE_Ins_3_3", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad7 createUnit ["ACE_Ins_3_4", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad7 createUnit ["ACE_Ins_3_5", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_leader7 = leader GroupSquad7;

_leader7 setVehicleInit "null = [group this,(getPos this)] execVM ""scripts\BIN_taskDefend.sqf""; ";

processInitCommands;

};

// 7 man molation Task Defend

case "mold7":

{

GroupSquad8 = CreateGroup resistance;

_leader8 = GroupSquad8 createUnit ["AFR_res_officer", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad8 createUnit ["AFR_res_Rifleman", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad8 createUnit ["AFR_res_Medic", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad8 createUnit ["AFR_res_Soldier_AA", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad8 createUnit ["AFR_res_Soldier_AT", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad8 createUnit ["AFR_res_Soldier_MG", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad8 createUnit ["AFR_res_Soldier_SN", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_leader8 = leader GroupSquad8;

_leader8 setVehicleInit "null = [group this,(getPos this)] execVM ""scripts\BIN_taskDefend.sqf""; ";

processInitCommands;

};

//molation Task Patrol

case "molp7":

{

GroupSquad9 = CreateGroup resistance;

_leader9 = GroupSquad9 createUnit ["AFR_res_officer", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad9 createUnit ["AFR_res_Rifleman", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad9 createUnit ["AFR_res_Medic", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad9 createUnit ["AFR_res_Soldier_AA", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad9 createUnit ["AFR_res_Soldier_AT", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad9 createUnit ["AFR_res_Soldier_MG", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad9 createUnit ["AFR_res_Soldier_SN", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_leader9 = leader GroupSquad9;

_leader9 setVehicleInit "null = [group this,(getPos this)] execVM ""scripts\BIN_taskpatrol.sqf""; ";

processInitCommands;

};

//molation fortify

case "molf7":

{

GroupSquad10 = CreateGroup resistance;

_leader10 = GroupSquad10 createUnit ["AFR_res_officer", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad10 createUnit ["AFR_res_Rifleman", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad10 createUnit ["AFR_res_Medic", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad10 createUnit ["AFR_res_Soldier_AA", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad10 createUnit ["AFR_res_Soldier_AT", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad10 createUnit ["AFR_res_Soldier_MG", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad10 createUnit ["AFR_res_Soldier_SN", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_leader10 = leader GroupSquad10;

[ _leader10, _SpawnPos, "fortify", "delete:", 600] execVM "scripts\UPSMON.sqf";

};

// molation reinforcments

case "molr7":

{

GroupSquad11 = CreateGroup resistance;

_leader11 = GroupSquad11 createUnit ["AFR_res_officer", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad11 createUnit ["AFR_res_Rifleman", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad11 createUnit ["AFR_res_Medic", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad11 createUnit ["AFR_res_Soldier_AA", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad11 createUnit ["AFR_res_Soldier_AT", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad11 createUnit ["AFR_res_Soldier_MG", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad11 createUnit ["AFR_res_Soldier_SN", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_leader11 = leader GroupSquad11;

[ _leader11, _SpawnPos, "move", "delete:", 300, "reinforcement"] execvm "scripts\UPSMON.sqf";

};

//3 man insurgents Fortify

case "insf3":

{

GroupSquad12 = CreateGroup resistance;

_leader12 = GroupSquad12 createUnit ["ACE_Ins_1_1", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad12 createUnit ["ACE_Ins_1_2", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad12 createUnit ["ACE_Ins_1_3", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_leader12 = leader GroupSquad12;

[ _leader12, _SpawnPos, "fortify", "delete:", 600] execVM "scripts\UPSMON.sqf";

};

//3 man insurgents Reinforce

case "insr3":

{

GroupSquad13 = CreateGroup resistance;

_leader13 = GroupSquad13 createUnit ["ACE_Ins_2_1", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad13 createUnit ["ACE_Ins_2_2", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad13 createUnit ["ACE_Ins_2_3", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_leader13 = leader GroupSquad13;

[ _leader13, _SpawnPos, "move", "delete:", 300, "reinforcement"] execvm "scripts\UPSMON.sqf";

};

//3 man insurgents Task Patrol

case "insp3":

{

GroupSquad14 = CreateGroup resistance;

_leader14 = GroupSquad14 createUnit ["ACE_Ins_3_1", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad14 createUnit ["ACE_Ins_3_2", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad14 createUnit ["ACE_Ins_3_3", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_leader14 = leader GroupSquad14;

_leader14 setVehicleInit "null = [group this,(getPos this), 250] execVM ""scripts\BIN_taskPatrol.sqf""; ";

processInitCommands;

};

// 3 man insurgents TaskDefend

case "insd3":

{

GroupSquad15 = CreateGroup resistance;

_leader15 = GroupSquad15 createUnit ["ACE_Ins_3_1", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad15 createUnit ["ACE_Ins_3_2", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad15 createUnit ["ACE_Ins_3_3", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_leader15 = leader GroupSquad15;

_leader15 setVehicleInit "null = [group this,(getPos this)] execVM ""scripts\BIN_taskDefend.sqf""; ";

processInitCommands;

};

// 3 man molation Task Defend

case "mold3":

{

GroupSquad16 = CreateGroup resistance;

_leader16 = GroupSquad16 createUnit ["AFR_res_officer", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad16 createUnit ["AFR_res_Rifleman", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad16 createUnit ["AFR_res_Medic", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_leader16 = leader GroupSquad16;

_leader16 setVehicleInit "null = [group this,(getPos this)] execVM ""scripts\BIN_taskDefend.sqf""; ";

processInitCommands;

};

//3 man molation Task Patrol

case "molp3":

{

GroupSquad17 = CreateGroup resistance;

_leader17 = GroupSquad17 createUnit ["AFR_res_officer", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad17 createUnit ["AFR_res_Rifleman", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad17 createUnit ["AFR_res_Medic", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_leader17 = leader GroupSquad17;

_leader17 setVehicleInit "null = [group this,(getPos this)] execVM ""scripts\BIN_taskpatrol.sqf""; ";

processInitCommands;

};

//3 man molation fortify

case "molf3":

{

GroupSquad18 = CreateGroup resistance;

_leader18 = GroupSquad18 createUnit ["AFR_res_officer", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad18 createUnit ["AFR_res_Rifleman", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad18 createUnit ["AFR_res_Medic", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_leader18 = leader GroupSquad18;

[ _leader18, _SpawnPos, "fortify", "delete:", 600] execVM "scripts\UPSMON.sqf";

};

// 3 man molation reinforcments

case "molr3":

{

GroupSquad19 = CreateGroup resistance;

_leader19 = GroupSquad19 createUnit ["AFR_res_officer", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad19 createUnit ["AFR_res_Rifleman", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_unit = GroupSquad19 createUnit ["AFR_res_Medic", [(getMarkerPos _SpawnPos) select 0,(getMarkerPos _SpawnPos) select 1,0], [], 3, "FORM"];

_leader19 = leader GroupSquad19;

[ _leader19, _SpawnPos, "move", "delete:", 300, "reinforcement"] execvm "scripts\UPSMON.sqf";

};

};

---------- Post added at 05:18 PM ---------- Previous post was at 05:15 PM ----------

and in my init

if (isServer) then

{

//Init UPSMON scritp

call compile preprocessFileLineNumbers "scripts\Init_UPSMON.sqf";

};

Share this post


Link to post
Share on other sites
CALL or execvm is the same, best if you can call because do not need to compile another time the script. so you can use call upsmon instead execvm if run in script

UPSMON is compiled on init in UPSMON var:

[ _leader1, _SpawnPos, "fortify", "delete:", 600,"spawned"] call UPSMON;

DO NOT FORGOT to add "spawned" in all squads created dinamically by script.

What do you mean by the last part? Do I need to put this in my code somewhere?

For the group leader name, how do I know which one is the group leader? I can't tell that and I don't recall naming any group leaders in that code.

Or are you saying this:

(units GroupInd5) select 0

is the group leader?

Sorry my scripting knowledge sucks.

Thanks for the help.

EDIT:

Hmmmmm. That still doesn't work. I tried:

_grp5 = [position Insgroup4, resistance,["ACE_Ins_2_8", "ACE_Ins_2_1", "ACE_Ins_3_2", "ACE_Ins_1_4", "ACE_Ins_2_7", "ACE_Ins_1_2", "ACE_Ins_3_10", "ACE_Ins_2_5", "ACE_Ins_2_2"]] call BIS_fnc_spawnGroup;
call {[(units _grp5) select 0, "PLA1","move","noslow","nowp","reinforcement","track"] execVM "scripts\upsmon.sqf"};
_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";

Samething though. This group spawns but is using UPSMON.

EDIT2:

My apologies, it seems that does make it work. Thanks a lot Monsada!

Edited by Manzilla

Share this post


Link to post
Share on other sites

update i got the count to go up finally dunno y it wasnt working before i didnt change anything..

---------- Post added at 07:52 PM ---------- Previous post was at 07:24 PM ----------

do i have to set KRON_UPS_reinforcement = false; in the ups init to true to get reinforcements to work?

Edited by {Op4}Bsilenced

Share this post


Link to post
Share on other sites

AFAIK you set to to true anywhere in your mission at the moment you want reinforcement to happen, which may or may not be at the start of the mission.

Share this post


Link to post
Share on other sites

i was under the impression that reinforcement troops reinforce troops withing kron radio range

btw call got move patrol to work yay!

Share this post


Link to post
Share on other sites

do i have to set KRON_UPS_reinforcement = false; in the ups init to true to get reinforcements to work?

You can do it, but the normal is to do a trigger of detection in the mision and put in KRON_UPS_reinforcement = true;

If you want reinforcement troops go to reinforce a especific pont you need to do next:

1-do a group of reinforcements, in next example I create a reinforcement group 1:

put "reinforcement:",1 in each esquad you want to be of reinforcement group 1. You can create all reinforcement groups as you want from 1 to n

 [leader1,"PLA1","reinforcement:",1] execVM "scripts\upsmon.sqf";
[leader2,"PLA1","reinforcement:",1] execVM "scripts\upsmon.sqf";
[leader3,"PLA1","reinforcement:",1] execVM "scripts\upsmon.sqf";

Each three leaders have the same reinforcement group ID=1

2-Instead of calling reinforcement with KRON_UPS_reinforcement = true use:

 KRON_UPS_reinforcement[color="Blue"][b]1[/b][/color]= true;

With this method you can especify wich reinforcement group is activated. In the same point you can especify a desty of reinforcement, create a trigger of detection and put this code.

 KRON_UPS_reinforcement1 = true;
KRON_UPS_reinforcement1_pos = getmarkerpos "rf1";

In this example all 3 squads will go to position of marker "rf1", you can put the vector position by other way, this is only a maner of doing.

Edited by Monsada

Share this post


Link to post
Share on other sites

that explains alot, thanks, but i gotta say this could use some improvement...

one idea would be to settup a new option like reinforce:1, and when the group with the init reinforce:1 gets low then the group with "reinforcement:",1] would come to the rescure automaticly...

---------- Post added at 10:05 AM ---------- Previous post was at 09:57 AM ----------

oh and sorry i got another question, what happens if i prematurely set reinforcment to true before theres enemy troops, how will they react?

will they just wait till there told about enemy pos or do they amediately move out to where enemy is even if its far away ..

Share this post


Link to post
Share on other sites
that explains alot, thanks, but i gotta say this could use some improvement...

one idea would be to settup a new option like reinforce:1, and when the group with the init reinforce:1 gets low then the group with "reinforcement:",1] would come to the rescure automaticly...

---------- Post added at 10:05 AM ---------- Previous post was at 09:57 AM ----------

oh and sorry i got another question, what happens if i prematurely set reinforcment to true before theres enemy troops, how will they react?

will they just wait till there told about enemy pos or do they amediately move out to where enemy is even if its far away ..

mmm this could be well.

If units of group to reinforce fells down they will put automatically in reinforcement and the reinforcemet position would be position of that squad.

I will do it

Share this post


Link to post
Share on other sites
mmm this could be well.

If units of group to reinforce fells down they will put automatically in reinforcement and the reinforcemet position would be position of that squad.

I will do it

I like that idea!

{Op4}Bsilenced,

I think that's the case. I have't figured out how to:

do a trigger of detection in the mision and put in KRON_UPS_reinforcement = true;

so my it's set to true from the beginning. I think that's why the enemy AI reinforcements in my mission just start heading to the zone right away.

Share this post


Link to post
Share on other sites

From my quick test it seems to run much smoother. I really like how the AI reacts in this script. Great job.

Share this post


Link to post
Share on other sites

eww something new

KRON_UPS_ARTILLERY_EAST_FIRE = false; //for doing Artilleries to fire on known

KRON_UPS_ARTILLERY_WEST_FIRE = false; //for doing Artilleries to fire on known

KRON_UPS_ARTILLERY_GUER_FIRE = false; //for doing Artilleries to fire on known

how does this work?

---------- Post added at 11:26 AM ---------- Previous post was at 11:23 AM ----------

manzilla in the ups init its reinforcement is set to false im using a trigger like this to turn it on

//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["player in thislist","

KRON_UPS_reinforcement = true;

",""];

then the onj complete trigger turns it back off for the next obj

Share this post


Link to post
Share on other sites

I think that's explained somewhere earlier in this thread. I haven't seen or used it in game yet though, I figured it was already added. It may be something different about artillery I saw though.

Thanks so much for the createtrigger stuff. I always wondered how to create one via script and I was just about to look in to it. :)

Share this post


Link to post
Share on other sites

well what had me confused was it seemed to be working on its own but i think what your seeing is your reinforcement troops happen to be in radio range to help fight, so i guess they would need the nomove command too,,

omg this script is getting incredible

respawn:x = allows to define the number of times squad may respawn.

---------- Post added at 11:54 AM ---------- Previous post was at 11:49 AM ----------

i just got done looking at the example mission, i dont see this added to any unit should it be added to an arty peice?

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

---------- Post added at 12:09 PM ---------- Previous post was at 11:54 AM ----------

i see your spawning a virtual arty peice now nul=[markerPos "art1"] spawn MON_artillery;

Share this post


Link to post
Share on other sites

[quote name={Op4}i just got done looking at the example mission, i dont see this added to any unit should it be added to an arty peice?

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

I think so. I was gonna try that later.

What does the part in bold mean?:

_trgc_4 setTriggerStatements["[b]player in thislist[/b]","KRON_UPS_reinforcement = true;",""];

Does that mean the player has to be present in the trigger? Do I need to change this if I want it to be just a West group, doesn't matter if it's the player or not. I also wanted to make it so the enemy AI, in this case Independent side, has to detect the BLUFOR groups before the trigger goes off. I think I know how to do that by changing "PRESENT" to "GUER D" in the setTriggerActivation line.

Share this post


Link to post
Share on other sites

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

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  

×