IRONFRONT FANS FORUM
Register Latest Topics
 
 
 


Reply
  Author   Comment  
Gunter Severloh

Avatar / Picture

Admin
Registered:
Posts: 2,749
Reply with quote  #1 
Download:
MG42 Team setup and break down

Here is a video describing this script's functioning. Watch in HD to see the commands.

So what we have is a simple script that adds the action "set up mg on mount" and un-deploy MG into mobile gun.
Place a Machine Gunner (the man not the mounted weapon type) on the map and name him "gun". Place a second soldier down, doesn't matter what type (either can be the player if you wish) call this one "tripod" . in Tripods init:
Code:
 remove backpack this; this addBackPack "Lib_mg42_tripod_disasm"; this addAction ["Set up MG42 Mount", "scripts\Mg42Deploy.sqf"];

and put both these .sqf files in your scripts mission folder: 1) mg42deploy.sqf
Code:
if (gun distance tripod < 10) then
{
gun removeWeapon "Lib_MG42";
removeBackPack tripod;
sleep 0.1;
gun playmove "RepairingKneel";
sleep 10;
mg = createVehicle ["Lib_MG42_Lafette", getPos gun, [], 0, "NONE"];
mg setDir (getDir gun);
mg setPos [getPos gun select 0, getPos gun select 1, getPos gun select 2];
sleep 0.5;
gun moveinGunner mg;
mg addAction ["Undeploy MG", "scripts\Mg42UnDeploy.sqf"];
for [{_i=0}, {_i<500}, {_i=_i+1}] do
{
gun removeAction _i;
tripod removeAction _i;
}
}
else
{
hint "The tripod carrier and gunner are too far from each other. Order your MG gunner to set up the mount";
};

2) mg42 undeploy.sqf
Code:
if (mg distance tripod < 10) then
{
gun addWeapon "Lib_MG42";
tripod addBackPack "Lib_mg42_tripod_disasm";
sleep 0.1;
deleteVehicle mg;
sleep 0.5;
tripod addAction ["Set Up MG Mount", "scripts\Mg42Deploy.sqf"];
}
else
{
hint "The tripod carrier and MG42 are too far from each other.";
};


the break down is unsimulated and quick. If you want to get fancy you can eject the gunner and have him play the animation again and put a time delay ..

One thing to look out for: when you first order the mg gunner to set up the mount it takes 10 seconds before the action menu entry is removed. Don't spam the command in this time just use it once. Also I dont know what happens if the mg gunner dies during the setup phase
Enjoy

__________________
0
Gunter Severloh

Avatar / Picture

Admin
Registered:
Posts: 2,749
Reply with quote  #2 
Script is now hosted on the MR, readme included, first post updated with link to download script.
__________________
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.