Jump to content
roy86

[SP/MP][COOP] Patrol Operations - Official Thread

Recommended Posts

What do i have to change in this code

_preAssignedRole = player setVariable ["PO3_VAR_roleAttribute",nil];
if(isNil "_preAssignedRole") then {
	switch (true) do {
		case ( getText(configFile >> "CfgWeapons" >> primaryWeapon(player) >> "UIPicture" ) == "\a3\weapons_f\data\ui\icon_mg_ca.paa") : { player setVariable ["PO3_VAR_roleAttribute","MachineGunner",true] };
		case ( getText(configFile >> "CfgWeapons" >> secondaryWeapon(player) >> "UIPicture" ) == "\a3\weapons_f\data\ui\icon_at_ca.paa") : { player setVariable ["PO3_VAR_roleAttribute","MissileSpecialist",true] };
		case ( (typeOf player) IN ["B_soldier_repair_F","O_soldier_repair_F","I_soldier_repair_F","B_Pilot_F","BWA3_Crew_Tropen","BWA3_Crew_Fleck"] ) : {
			player setVariable ["PO3_VAR_roleAttribute","Support",true];
			[player] call PO3_fnc_setAsCrewman; // Automatically Assign Drivers License
			[player] call PO3_fnc_setAsPilot; // Automatically Assign Pilots License
		};
		default { player setVariable ["PO3_VAR_roleAttribute","Rifleman",true] };
	};
};

to get the role assignment not by the class, but by the unit name (like s1,s2,...,s40)?

Share this post


Link to post
Share on other sites
What do i have to change in this code

_preAssignedRole = player setVariable ["PO3_VAR_roleAttribute",nil];
if(isNil "_preAssignedRole") then {
	switch (true) do {
		case ( getText(configFile >> "CfgWeapons" >> primaryWeapon(player) >> "UIPicture" ) == "\a3\weapons_f\data\ui\icon_mg_ca.paa") : { player setVariable ["PO3_VAR_roleAttribute","MachineGunner",true] };
		case ( getText(configFile >> "CfgWeapons" >> secondaryWeapon(player) >> "UIPicture" ) == "\a3\weapons_f\data\ui\icon_at_ca.paa") : { player setVariable ["PO3_VAR_roleAttribute","MissileSpecialist",true] };
		case ( (typeOf player) IN ["B_soldier_repair_F","O_soldier_repair_F","I_soldier_repair_F","B_Pilot_F","BWA3_Crew_Tropen","BWA3_Crew_Fleck"] ) : {
			player setVariable ["PO3_VAR_roleAttribute","Support",true];
			[player] call PO3_fnc_setAsCrewman; // Automatically Assign Drivers License
			[player] call PO3_fnc_setAsPilot; // Automatically Assign Pilots License
		};
		default { player setVariable ["PO3_VAR_roleAttribute","Rifleman",true] };
	};
};

to get the role assignment not by the class, but by the unit name (like s1,s2,...,s40)?

each of the case statement.

e.g.

switch (true) do {
case (player == S1) : { player setVariable ["PO3_VAR_roleAttribute","MachineGunner",true] };
case ....
case ....
};

Share this post


Link to post
Share on other sites

Is it also possible to add multible units to one role like this?

_preAssignedRole = player setVariable ["PO3_VAR_roleAttribute",nil];
if(isNil "_preAssignedRole") then {
	switch (true) do {
		case (player == a1,a11,a21,b1,b11,b21,c1,c11,c21,d1,d11,d21,mc1,mc2,mc3) : { player setVariable ["PO3_VAR_roleAttribute","Rifleman",true] };
		case (player == a12,b12,c12,d12) : { player setVariable ["PO3_VAR_roleAttribute","Medic",true] };
		case (player == a14,a23,b14,b23,c14,c23,d14,d23) : { player setVariable ["PO3_VAR_roleAttribute","MissileSpecialist",true] };
		case (player == a13,a22,b13,b22,c13,c22,d13,d22) : { player setVariable ["PO3_VAR_roleAttribute","MachineGunner",true] };
		case (player == e11,e12,amfo) : { player setVariable ["PO3_VAR_roleAttribute","Recon",true] };

		case (player == s11,s12,arm11,arm12,arm21,arm22,t13,t14,t23,t24,Txu_ArtyMan) : { player setVariable ["PO3_VAR_roleAttribute","Support",true];
			[player] call PO3_fnc_setAsCrewman; // Automatically Assign Drivers License
		};

		case (player == fwa1,rwa1,rwa2,t11,t12,t21,t22) :  { player setVariable ["PO3_VAR_roleAttribute","Support",true];
			[player] call PO3_fnc_setAsPilot; // Automatically Assign Pilots License
		};
		default { player setVariable ["PO3_VAR_roleAttribute","Rifleman",true] };
	};
};

Edited by audiocustoms

Share this post


Link to post
Share on other sites

Is it possible to disable whatever makes the inventory instantly close in the base?

Share this post


Link to post
Share on other sites
Is it also possible to add multible units to one role like this?

_preAssignedRole = player setVariable ["PO3_VAR_roleAttribute",nil];
if(isNil "_preAssignedRole") then {
	switch (true) do {
		case (player == a1,a11,a21,b1,b11,b21,c1,c11,c21,d1,d11,d21,mc1,mc2,mc3) : { player setVariable ["PO3_VAR_roleAttribute","Rifleman",true] };
		default { player setVariable ["PO3_VAR_roleAttribute","Rifleman",true] };
	};
};

Not like that. Like the below:

_preAssignedRole = player setVariable ["PO3_VAR_roleAttribute",nil];
if(isNil "_preAssignedRole") then {
	switch (true) do {
		case (player == a1);
		case (player == a2);
		case (player == a3) : { player setVariable ["PO3_VAR_roleAttribute","Rifleman",true] };
	/* OR */
		case (player IN [a1,a2,a3] ) : { player setVariable ["PO3_VAR_roleAttribute","Rifleman",true] };
	};
};

---------- Post added at 08:33 AM ---------- Previous post was at 08:31 AM ----------

Is it possible to disable whatever makes the inventory instantly close in the base?

This is not by design and is not present in any version I've tested/played. I cannot debug that for you. Recommend you check your mods.

Share this post


Link to post
Share on other sites

Hi everybody ;)

It seems that since yesterday, with the lastest update for stable branch, the ammobox in south and north marina base are broken !!

you can't spawn VAS with it anymore ! you don't have the fonction with your scroll, and you have "drag" "select" or "place" for it ! and it's broken too!!

if you choose for example "place", with the camera you can see your ammobox very high in sky, etc..

Do you think you can fix that :( ?

Thanks:)

Share this post


Link to post
Share on other sites
Hi everybody ;)

It seems that since yesterday, with the lastest update for stable branch, the ammobox in south and north marina base are broken !!

you can't spawn VAS with it anymore ! you don't have the fonction with your scroll, and you have "drag" "select" or "place" for it ! and it's broken too!!

if you choose for example "place", with the camera you can see your ammobox very high in sky, etc..

Do you think you can fix that :( ?

Thanks:)

I would just open it up in your editor and copy paste crates from base to other areas and see if that works, if those crates are floating check their elevation in their init.box I have this AWESOME mission/s and edited the base etc.... no problems, other than HC

great mission.

Share this post


Link to post
Share on other sites
Hi everybody ;)

It seems that since yesterday, with the lastest update for stable branch, the ammobox in south and north marina base are broken !!

you can't spawn VAS with it anymore ! you don't have the fonction with your scroll, and you have "drag" "select" or "place" for it ! and it's broken too!!

if you choose for example "place", with the camera you can see your ammobox very high in sky, etc..

Do you think you can fix that :( ?

Thanks:)

Same problem on our server

Share this post


Link to post
Share on other sites

Is there a variable or something I can change to speed up the mission intro (with the flying camera)? :)

Edit:

This is not by design and is not present in any version I've tested/played. I cannot debug that for you. Recommend you check your mods.

Oh, okay. Yeah, the server is running a lightly edited version, but I didn't think the original modification would have added this. Sorry, nevermind then. :p

Edited by rzon

Share this post


Link to post
Share on other sites

@roy86

Would you ever consider releasing the SquadMod as a separate script? We'd love to get our hands on it, just without the role selection and the UAV/UAG buttons.

Share this post


Link to post
Share on other sites
@roy86

Would you ever consider releasing the SquadMod as a separate script? We'd love to get our hands on it, just without the role selection and the UAV/UAG buttons.

Yep, I'll work on releasing feature separated scripts after Patrol Ops 3.3 Update

Share this post


Link to post
Share on other sites

@Roy86

On Patrol Ops, I like to edit it and spice things up, but some things seem to conflict. For example, if I use MCC to do a supply drop, the aircraft will spawn and come towards the drop zone. When it reaches about 1-2km out, it seems to change its mind. It's as if something takes over the AI. In fact, a lot of the MCC stuff just doesn't work at all in patrol ops for some reason - do you have anti-cheat code hidden in there that I need to disable?

Share this post


Link to post
Share on other sites
@Roy86

On Patrol Ops, I like to edit it and spice things up, but some things seem to conflict. For example, if I use MCC to do a supply drop, the aircraft will spawn and come towards the drop zone. When it reaches about 1-2km out, it seems to change its mind. It's as if something takes over the AI. In fact, a lot of the MCC stuff just doesn't work at all in patrol ops for some reason - do you have anti-cheat code hidden in there that I need to disable?

not that I'm aware of. I made sure the AI not spawned by the PO3 scripts are generally absent of any over riding scripts so as to support the AI Mods that may be used.

I have not use MCC so cannot validate that.

Share this post


Link to post
Share on other sites

@Roy86

Cheers for the response. I have a feeling there's a script of some sort being run every few seconds that breaks things like MCC as when I'm in the MCC editor I can see the unit icons sort of flash briefly; this doesn't happen normally; that's why I assumed it must be a script checking for hacks.

Also, I had enabled AI at one stage and set up the high command modules on the squads. Oddly, when giving them commands, the waypoint arrows (the thin blue line arrows) that normally show up on the map quickly get removed.

I'll have a look and see if I can track it down.

Share this post


Link to post
Share on other sites
@Roy86

On Patrol Ops, I like to edit it and spice things up, but some things seem to conflict. For example, if I use MCC to do a supply drop, the aircraft will spawn and come towards the drop zone. When it reaches about 1-2km out, it seems to change its mind. It's as if something takes over the AI. In fact, a lot of the MCC stuff just doesn't work at all in patrol ops for some reason - do you have anti-cheat code hidden in there that I need to disable?

Are you wanting an AI resupply? there are ammo supply drop scripts with boxes loaded as sqf to load in heli's, I have not used it in PO3.1 But it works in other missions for ++players++ to drop ammo resupply, I am using some other scripts, time skip, fast ropes, a basic lift script as the one in place does not seem to work, field repairs, I also updated all vehicles at base and added TFAR crates as our clan uses TFAR. NO problems as I know of, I am using VCOMAI too its a AIbehavior script, seems to all work.

Share this post


Link to post
Share on other sites

@JAndews1

Yeah cheers, I'll have a look. I've done something similar to you; added fast ropes, TFAR, XMed and even alive combat support. If you haven't added alive combat support yet, it's really worth it. We have transport, arty and CAS using Alive.

I wanted to use some of the MCC stuff just to add a bit of variety now and then, but it doesn't like patrol ops at all. The two times I've tried to use the MCC supply drop with the Nato supply box, it actual crashed my server. Works fine if I do a vehicle supply drop though - very odd.

Share this post


Link to post
Share on other sites

Hi, I would like to "extract" the random tasks from PO in order to use for my own personal mission (nothing will be released).

I wanted to ask what would I need from PO in order to get just the random missions. I want to have a static object acting like a radio, that once activated assigns a random task. Would it be possible to mod the tasks mechanics from PO in order to do that? What files I would need and what would I need to change in them?

Dont get me wrong, you guys did a great job, but Im just looking for something that would replace the Secondary Ops Manager from A2 in my singleplayer sandbox.

Share this post


Link to post
Share on other sites
Hi, I would like to "extract" the random tasks from PO in order to use for my own personal mission (nothing will be released).

I wanted to ask what would I need from PO in order to get just the random missions. I want to have a static object acting like a radio, that once activated assigns a random task. Would it be possible to mod the tasks mechanics from PO in order to do that? What files I would need and what would I need to change in them?

Dont get me wrong, you guys did a great job, but Im just looking for something that would replace the Secondary Ops Manager from A2 in my singleplayer sandbox.

The task system relies on the whole MP framework behind PO3 and that is not an simple thing to "extract". Essentially PO3 IS the task system and the framework is supporting it.

In your script all you need is when you run it, have an array of tasks that you want available and then execute a random one.

Share this post


Link to post
Share on other sites

@roy86

Nobody answer me ! I would like to know if you have problems with the Patrol OPS v3.1 since the latest stable game update ?

In my case : when we have finished a task, it doesn't set it on "succeeded"... and the next task doesn't spawn ! i must select "next task" in the admin control (that set the previous task on "canceled" even if it's done) !

I would like to know if i have something to do to fix that with the 3.1, until you release the 3.3 version ?

Thanks for your answer ;)

Share this post


Link to post
Share on other sites
not that I'm aware of. I made sure the AI not spawned by the PO3 scripts are generally absent of any over riding scripts so as to support the AI Mods that may be used.

I have not use MCC so cannot validate that.

I got to the bottom of this. MCC spawns the supply drop as an MH39 (if memory serves me) and as it was flying to wards the base, it's picking up NATO units in its radar as enemy targets (I hijacked one of the units in the supply helicopter to see what was going on). So it's nothing to do with Patrol Ops.

I also got the high command module working by disabling the 3D Orbat marker code.

Share this post


Link to post
Share on other sites

I noticed that while I set up parameters of the mission the one that enables/disables 3'D person view doesn't work. I've downloaded the pbo just few days ago and didn't modified it. The others parameters work all well! Can't explain it....:confused::confused::confused:

Thanks for answering.

Share this post


Link to post
Share on other sites
@roy86

Nobody answer me ! I would like to know if you have problems with the Patrol OPS v3.1 since the latest stable game update ?

In my case : when we have finished a task, it doesn't set it on "succeeded"... and the next task doesn't spawn ! i must select "next task" in the admin control (that set the previous task on "canceled" even if it's done) !

I would like to know if i have something to do to fix that with the 3.1, until you release the 3.3 version ?

Thanks for your answer ;)

Hi Chal00, can't say we've had any problems. I'll take a deeper look soon and see whats happening.

I got to the bottom of this. MCC spawns the supply drop as an MH39 (if memory serves me) and as it was flying to wards the base, it's picking up NATO units in its radar as enemy targets (I hijacked one of the units in the supply helicopter to see what was going on). So it's nothing to do with Patrol Ops.

I also got the high command module working by disabling the 3D Orbat marker code.

Nice work. I'll look at making the orbat not dependant on BIS group configuration so as not to effect High Command

I noticed that while I set up parameters of the mission the one that enables/disables 3'D person view doesn't work. I've downloaded the pbo just few days ago and didn't modified it. The others parameters work all well! Can't explain it....:confused::confused::confused:

Thanks for answering.

Thanks for reporting. Please log in the dev-heaven and I'll look into it.

Cheers

Share this post


Link to post
Share on other sites
@roy86

Nobody answer me ! I would like to know if you have problems with the Patrol OPS v3.1 since the latest stable game update ?

In my case : when we have finished a task, it doesn't set it on "succeeded"... and the next task doesn't spawn ! i must select "next task" in the admin control (that set the previous task on "canceled" even if it's done) !

I would like to know if i have something to do to fix that with the 3.1, until you release the 3.3 version ?

Thanks for your answer ;)

We're experiencing the same thing on our server.

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

×