Jump to content
Sign in to follow this  
Morten87

Static Mortars/ Machinguns

Recommended Posts

Hello.

Im making a mission there you have have 2 mortars and 2 machinguns at your disposal, and with the new backpack system this is brilliant. I only wish there were a metod there dissembling and assembling would go faster, and much more efficent.

As off now I need 2 soldiers to carry the equiment pieces, of one static mortars and machinguns. And this makes it hard to assembling it efficent.

Are there a way I could make it easyer? say for instece use a Attachto command and attach those to pieces that needs to be carryed to one?

Share this post


Link to post
Share on other sites

you can cheat.

this is untested, but idea is when you pickup one of the packs named in the array _typeStatics, in this case the m2 static mg or the m252 mortar, it waits until you drop it and then add a tripod to you so you can drop that as well and assemble all alone.

simply copy and place all below into unit init line, untested, let me know if it does not work and ill go test myself.

_null = this spawn {

_typeStatics = [
"SPG9_TK_INS_Bag_EP1","SPG9_TK_GUE_Bag_EP1","TOW_TriPod_US_Bag_EP1","Metis_TK_Bag_EP1","2b14_82mm_TK_INS_Bag_EP1","2b14_82mm_TK_GUE_Bag_EP1",
"2b14_82mm_TK_Bag_EP1","M252_US_Bag_EP1","AGS_UN_Bag_EP1","AGS_TK_INS_Bag_EP1","AGS_TK_GUE_Bag_EP1","AGS_TK_Bag_EP1","MK19_TriPod_US_Bag_EP1",
"KORD_UN_Bag_EP1","KORD_TK_Bag_EP1","KORD_high_UN_Bag_EP1","KORD_high_TK_Bag_EP1","DSHkM_Mini_TriPod_TK_INS_Bag_EP1","DSHkM_Mini_TriPod_TK_GUE_Bag_EP1",
"DSHKM_TK_INS_Bag_EP1","DSHKM_TK_GUE_Bag_EP1","M2HD_mini_TriPod_US_Bag_EP1","M2StaticMG_US_Bag_EP1"];

while {alive _this} do {
	waitUntil {!isNull (unitBackpack _this)};
	_ruck = (typeOf (unitBackpack _this));
	if (_ruck in _typeStatics) then {
		waitUntil {isNull (unitBackpack _this)};
		_orgPos = (getPos _this);
		_tripod = "Tripod_Bag";
		_this addBackpack _tripod;
		waitUntil {isNull (unitBackpack _this)};
		waitUntil {!isNull (unitBackpack _this)};
		if ((typeOf (unitBackpack _this)) in _typeStatics) then {
			_pod = nearestObject [_this, "Tripod_Bag"];
			if (!isNull _pod AND (_this distance _orgPos) < 5) then {deleteVehicle _pod};
		};
	} else {
		waitUntil {isNull (unitBackpack _this) OR (typeOf (unitBackpack _this)) != _ruck};
	};
};
};

Edit: tested and updated, now works with any type vanilla static bag.

pick up any static type bag, go somewhere, drop the static bag, you get cheat tripod on your body, look at static bag on ground, choose assemble, now when done choose unassemble, pick up the static again, "NOT THE TRIPOD" then tripod is deleted and you can go somewhere else and repeat the procedure.

Edited by Demonized
added edit

Share this post


Link to post
Share on other sites

thanks for replying, as soon I get home from work im gonna testet it :)

Share this post


Link to post
Share on other sites

updated previous post. and made a seperate post for it, with instructions on how to use in script form as well, for example for spawned units or later in missions etc.

[cheat]

Share this post


Link to post
Share on other sites

But do I type this in the init. on the unit, or do I need to script this?..

Have zero/ no clue how to scripting. So if I need to script this can you help me with the real basic?:P

Wanted to ask.. How the hell did you find this out?:P Did you figured it out your self?:P Must say Im impresed:D

Edited by Morten87

Share this post


Link to post
Share on other sites

just copy everything inside PHP code and ctrl v(paste) it in init of unit in editor and you are good to go.

Share this post


Link to post
Share on other sites

Alright Home sweet home.

Ok Demonized,

I tryed copy/ paste in the init. But dosent work. Is it possibly to dumb it down?:P

Share this post


Link to post
Share on other sites

ok mate: here is a demo mission: http://www.4shared.com/file/1FlBtNqS/demoDesert_E.html

unrar it and place the inside folder into C:\Users\DP490\Documents\ArmA 2 Other Profiles\yourNick\missions

im on win 7, might be slightly different if you use XP or something.

Edit: instructions dumbed down as requested.

1: approach any of the 4 static weapon packs around you.

2: look at it and choose pickup or take pack.

3: press G to open your gear menu, then click on pack and click on drop.

4: notice you get a new pack in your inventory, dont mind it, press G again.

5: look at the dropped pack, choose assemble.

6: shoot some stuff.

7: look at static weapon, choose disassemble.

8: 2 packs are now on ground, look at them both and pick up the weapon pack not the tripod pack.

9: notice tripod pack is removed when you pick up weapon pack.

Edited by Demonized

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  

×