Jump to content
Sign in to follow this  
igneous01

High Command - Weapon Teams Command Script (control MG and Mortar Teams)

Recommended Posts

Script updated to 1.0, here are the new changes:

- added OA backpacks for all weapon teams (backpacks are added/removed when teams are deployed/packed up)

- added ammo count for MG teams (default is 6 belts per team) can be changed in the WeaponTeamInit

older changes:

- added support for multiple selections while using weapon team actions

- added ammo count for mortar teams (default is 12 shells per team) you can change this in the init script

- added a submenu for mortar fire missions

- added many more fire mission types, including ability to cancel

- added support for all sides

All the actions are in the communication menu (0-8), groups that are added to the script will have their HighCommand Group Icon change into the appropriate team symbol. You order these groups around like any other high command groups, then use the communication menu to deploy/packup and call in mortar strikes.

Teams when asked to deploy/pack up will go down, play an animation, then the weapon will appear and the unit will go into it. If the gunner dies in combat while deployed, the next man in the team will take over the position and continue firing. Teams are vulnerable when setting up/packing weapons and it takes 15 seconds to finish setting up.

This is Executed Via:

nul = [[g1,g2], [g3,g4]] execVM "WeaponTeamScript\WeaponTeamInit.sqf"

where [g1, g2] is an ARRAY of GROUPS that are to become Mortar Teams, and [g3, g4] is an ARRAY of GROUPS that are to become MG Teams.

EXAMPLE MISSION:

4 shared - link 1

Media Fire - link 2

In the example mission, you will start on Utes with 3 fireteams, 2 mg teams, and 2 mortar teams. There is some enemy in the north village for you to take a test drive.

Edited by Igneous01
Updated script

Share this post


Link to post
Share on other sites

Great work Igneous01! :thumbsup:

Is it possible to add west and maybe indep to it as well?

I am surprised no one thought of it before!

Share this post


Link to post
Share on other sites
Great work Igneous01! :thumbsup:

Is it possible to add west and maybe indep to it as well?

I am surprised no one thought of it before!

thanks

actually its pretty easy to adapt for west or independants, just replace the mortar and mg with the one for the side. Its near the top of WeaponTeamInit.sqf:

// change high command icon to match group role
{
_x setvariable ["MARTA_customIcon",["o_mortar"]];
_x setVariable ["DZ_WTS_Type", 0];
     _x setVariable ["DZ_WTS_Deployed", false];
_x enableAttack false;
if (side _x == EAST) then {
	_x setVariable ["DZ_WTS_Weapon", "[color="Red"]2b14_82mm[/color]"];
};
} foreach _MortarGroups;
{
_x setvariable ["MARTA_customIcon",["o_support"]];
_x setVariable ["DZ_WTS_Type", 1];
_x setVariable ["DZ_WTS_Deployed", false];
_x enableAttack false;
if (side _x == EAST) then {
	_x setVariable ["DZ_WTS_Weapon", "[color="Red"]DSHKM_Ins[/color]"];
};
} foreach _MGGroups;

just find the weapon classname for the mortar you want to use and mg, and copy it inside those quotes, and it will work for any other side.

Let me know if there are any issues with it, I have not yet updated this script with more features, but once I get my campaign in good shape it will be on my todo list.

Share this post


Link to post
Share on other sites
thanks

actually its pretty easy to adapt for west or independants, just replace the mortar and mg with the one for the side. Its near the top of WeaponTeamInit.sqf:

// change high command icon to match group role
{
_x setvariable ["MARTA_customIcon",["o_mortar"]];
_x setVariable ["DZ_WTS_Type", 0];
     _x setVariable ["DZ_WTS_Deployed", false];
_x enableAttack false;
if (side _x == EAST) then {
	_x setVariable ["DZ_WTS_Weapon", "[color="Red"]2b14_82mm[/color]"];
};
} foreach _MortarGroups;
{
_x setvariable ["MARTA_customIcon",["o_support"]];
_x setVariable ["DZ_WTS_Type", 1];
_x setVariable ["DZ_WTS_Deployed", false];
_x enableAttack false;
if (side _x == EAST) then {
	_x setVariable ["DZ_WTS_Weapon", "[color="Red"]DSHKM_Ins[/color]"];
};
} foreach _MGGroups;

just find the weapon classname for the mortar you want to use and mg, and copy it inside those quotes, and it will work for any other side.

Let me know if there are any issues with it, I have not yet updated this script with more features, but once I get my campaign in good shape it will be on my todo list.

Did that but weapons (deploy/pick up) options are grayed out. Markers are also infantry so they have not changed. Is there another line for side and imarker type needs changing?

Share this post


Link to post
Share on other sites
Did that but weapons (deploy/pick up) options are grayed out. Markers are also infantry so they have not changed. Is there another line for side and imarker type needs changing?

oops, the problem is staring me in the face haha, change the:

if (side _x == EAST)

to

if (side _x == WEST)

forgot that I had that in there for future side implements. should work once the side is changed to west

Share this post


Link to post
Share on other sites
oops, the problem is staring me in the face haha, change the:

if (side _x == EAST)

to

if (side _x == WEST)

forgot that I had that in there for future side implements. should work once the side is changed to west

I am still having the same issue despite changing the East to West. I have attached the example mission I am having the issue with. I appreciate you taking a quick look and letting me know my mistake.

http://www.mediafire.com/?c3g6r9qr27826rf

Share this post


Link to post
Share on other sites

your mission still show side equals EAST

---------- Post added at 03:50 PM ---------- Previous post was at 03:49 PM ----------

Your mission still shows side equals east

{

_x setvariable ["MARTA_customIcon",["o_mortar"]];

_x setVariable ["DZ_WTS_Type", 0];

_x setVariable ["DZ_WTS_Deployed", false];

_x enableAttack false;

if (side _x == EAST) then {

_x setVariable ["DZ_WTS_Weapon", "M252"];

};

Share this post


Link to post
Share on other sites
your mission still show side equals EAST

---------- Post added at 03:50 PM ---------- Previous post was at 03:49 PM ----------

Your mission still shows side equals east

yup, need to change both if cases to west (or you could remove the if statements since they are not really needed right now, assuming you know how to do that)

Share this post


Link to post
Share on other sites

also in the init line of your team leader you need to create a group ie g1=group this. You dont name the team leader g1

---------- Post added at 08:50 PM ---------- Previous post was at 08:45 PM ----------

Igneous01 what would also be very cool is if you have a crew served weapon have the crew fill all the avail slots of the weapon. ie mortars have two slots I believe. In your example 1 guys mans the mortar the other two hang out. Maybe to an array of the weapon slots on init. Just a thought

Share this post


Link to post
Share on other sites

As i mentioned earlier somewhere and what i think is common knowledge this doesnt work if units enter then exit a vehicle, which is a pain... they exit and move/deploy no problem but do not man weapon from memory, this is a BIS issue i believe.

Share this post


Link to post
Share on other sites
As i mentioned earlier somewhere and what i think is common knowledge this doesnt work if units enter then exit a vehicle, which is a pain... they exit and move/deploy no problem but do not man weapon from memory, this is a BIS issue i believe.

hmm strange, I never encountered that (yet). Thanks for the heads up.

Igneous01 what would also be very cool is if you have a crew served weapon have the crew fill all the avail slots of the weapon. ie mortars have two slots I believe. In your example 1 guys mans the mortar the other two hang out. Maybe to an array of the weapon slots on init. Just a thought

Shouldn't be too hard to implement, I may have some slight issues with getting the passenger of the mortar switch to gunner if the gunner dies, but it shouldn't be too difficult.

I just need to figure out someway of storing ammo for the static weapons so that the player cant packup/deploy and get standard ammo all over again.

Share this post


Link to post
Share on other sites

Thanks guys I got it working now.

I have implmented in Extended HC and works perfectly so far.

I assume I can replace the MG with any other static weapon such as Tow?

Share this post


Link to post
Share on other sites
Thanks guys I got it working now.

I have implmented in Extended HC and works perfectly so far.

I assume I can replace the MG with any other static weapon such as Tow?

technically, yes you can, it can be whatever static weapon you want it to be, just make sure this is the MGGroup weapon that is being replaced and not the mortar group

Share this post


Link to post
Share on other sites

Script has been updated with much more features and a nicer looking menu. first post updated.

Share this post


Link to post
Share on other sites

Very cool addon. Like the high command fire control. Very clever!

Share this post


Link to post
Share on other sites

this script works fantastic....was able to load mortar crew in trucks using domz high command system, move the mortar team to a specified location unload the team and let loose. very cool.

Share this post


Link to post
Share on other sites

glad to see it worked out, and so well with domz hc extensions :D

I sent him a message, maybe he'll add it into his addon ;)

Share this post


Link to post
Share on other sites
glad to see it worked out, and so well with domz hc extensions :D

I sent him a message, maybe he'll add it into his addon ;)

That would be ideal! :)

Share this post


Link to post
Share on other sites
this script works fantastic....was able to load mortar crew in trucks using domz high command system, move the mortar team to a specified location unload the team and let loose. very cool.

After reading that i went and tested again, i ordered mortar team into truck moved them 100 metres with get out order and made them deploy weapon and they do that no problem but it seems the gunner is always thrown out?

No other mods or scripts, maybe Domz found a work around or maybe its only me :confused:

Other than that this script is great fun :D

Share this post


Link to post
Share on other sites

OK here's a suggestion that will increase the visual part of a script.

When teams are assigned but not deployed - soldiers should carry packed weapons on their backs (vanilla ArmA2 has backpacks for MGs, I think for mortars too).

Simply add those backpacks when packed and remove when unpacked. Then add them back when packed again. Should be simple to do but will look more natural than soldiers getting weapons out of thin air.

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  

×