Jump to content
Andrew_S90

DualArms - Two Primary Weapons

Recommended Posts

Dual Arms

d3IuSkF.jpg

 

This is mod that allows use of two primary weapons, one in your main slot one in your launcher slot.

 

Download here!

 

Google Drive link here!

 

Dual Arms relies on eventHandlers to work correctly. 

The following are used:

Killed
InventoryOpened
InventoryClosed
Take

 

Bind UserAction 16 to any key to be able to swap with a key instead of addActions. They have been disabled by default.

 

If using this in a MP scenario or gamemode, you can override my code and set the ability to use addactions and drop the weapon on death. As well as add blocked weapons that will not be able to be added to your launcher slot.

 

What does this mod actually do?

I have seen other scripts that claim to do the same thing. 

This uses your launcher slot, the same that your RPG would go into. There is no attachTo/onEachFrames constantly making sure the weapon is on your back and attached when not in a vehicle.

Weights are fully supported, if you have two primary weapons it will slow you down with fatigue. That means you will slow to a crawl with dual SPMGs.

 

Due to the nature if this going into the launcher slot, mods need to be supported for it. Currently the top 20 Weapon mods on steam are supported, the list is on the steam workshop page above. (I also take suggestions on which mods to support with future updates!)

Currently 5.7k+ Weapons are supported.

 

If you are playing in a persistent game mode you will need to add some code to your file that saves a player when they disconnect, otherwise the pointer attachment and UGL ammo will not save. Otherwise it will save.

 

Here is a video where you can check it out in action, featuring vehicles as well:

 

The piece of code that will save your players gear in a dedicated MP environment is: (Usually handled by missionEventHandler onDisconnect)

Spoiler

//Dual Arms Start

		_SWInfo = _unit getVariable ["SecondaryWeaponsWeaponInfo", []];
				
		if(count _SWInfo > 0) then
		{
			_uniform = uniformContainer _unit;
			_vest = vestContainer _unit;
			_backpack = backpackContainer _unit;
			_containers = [_uniform, _vest, _backpack];
			{
				_item = _x;
				_className = "";
				_array = false;
				_added = false;
				if(typeName _item isEqualTo "ARRAY") then
				{
					_array = true;
					_className = _x select 0;
				} else {
					_className = _x;
				};
				
				{
					if (!(isNull _x)) then 
					{
						if (_x canAdd [_className, 1]) exitWith 
						{
							if(_array) then
							{
								_unit addMagazine [_className, _item select 1];
							} else {
								_className = [_className, 0, -10] call BIS_fnc_trimString;
								_unit addItem _className;
							};
							_added = true;
						};
					};
					if (_added) exitWith {};
				} forEach _containers;
			} forEach _SWInfo;
		};	
		//Dual Arms End

 

 

If you would like to know more about overriding my code please see the example MP mission inside the download from steam, right next to keys and addons folder. As well as my post on Exile forums explains with more details how to merge eventhandlers if needed. 

Here is some information on Exile Forums : 

My github with example config (also in download - this link contains overrides for Exile players as well) : https://github.com/Andrew-S90/DualArms

Download link from steam: http://steamcommunity.com/sharedfiles/filedetails/?id=1334412770

 

Update 2.0:

Added an additional 15 mods, including GM CDLC and Contact DLC.
5700+ Weapons and 2600+ Attachments made by the community supported.

Fixed Coop Blackscreen bug
Ammo count saves on weapon swap
Taking a launcher weapon when you have a primary on your back used to block it - now adds the weapon with attachments to the cargo space, seamlessly switching it out.
Secondary ammo count displayed visually in the inventory.

  • Like 14
  • Thanks 4

Share this post


Link to post
Share on other sites

must have:exclamation:

please  can you provide non steam link?

  • Like 1

Share this post


Link to post
Share on other sites

This is EXCELLENT. I tested this against both LEFT SHOULDER WEAPONS script and DOUBLE WEAPONS mod and it works with TPW_MODS where the two would throw up errors. FFV compatibility is great! Just need more vehicles with FFV options!

 

It also works great with TACTICAL WEAPON SWAP going through a kill house type scenario. Swap from primary to second primary to pistol with no reloading all the way thru was exhilarating. 

 

One option I would like to see would be ACE INTERACTION in the future like double weapons has and to speed switch between the two primaries but I get that its to simulate the weight and handling of the weapons.

 

And yes, it does affect the TAKE function so the hand does not show up when looking at a weapon on the ground, but its a good enough tradeoff to cycle 2 primaries to clear an area and circle back to upgrade weapons later.

  • Like 1

Share this post


Link to post
Share on other sites

Andrew nice work!

You know about Vlad333000 Double weapon?

he created the same thing back in 2016.
http://www.armaholic.com/page.php?id=31062
I asked Vlad back then for permissions to add it to my mod (IFA3WarMod) and i have a vid demonstrating on how it works.

I'll need to test out your version but i want to ask as has been asked before

is there a future possibility of using keybinds instead of the action menu?

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, Gunter Severloh said:

Andrew nice work!

You know about Vlad333000 Double weapon?

he created the same thing back in 2016.
http://www.armaholic.com/page.php?id=31062
I asked Vlad back then for permissions to add it to my mod (IFA3WarMod) and i have a vid demonstrating on how it works.

I'll need to test out your version but i want to ask as has been asked before

is there a future possibility of using keybinds instead of the action menu?

 

I have seen his yes, his uses attachTo and onEachFrame to work which can cause lag if used heavily in MP.

 

I made this to avoid that, use launcher slot and weights.. so it was more realistic.

 

I am also looking at use of keybinds by default and action menu hidden by default (still can be enabled by missionConfig if needed)

 

3 hours ago, Valken said:

This is EXCELLENT. I tested this against both LEFT SHOULDER WEAPONS script and DOUBLE WEAPONS mod and it works with TPW_MODS where the two would throw up errors. FFV compatibility is great! Just need more vehicles with FFV options!

 

It also works great with TACTICAL WEAPON SWAP going through a kill house type scenario. Swap from primary to second primary to pistol with no reloading all the way thru was exhilarating. 

 

One option I would like to see would be ACE INTERACTION in the future like double weapons has and to speed switch between the two primaries but I get that its to simulate the weight and handling of the weapons.

 

And yes, it does affect the TAKE function so the hand does not show up when looking at a weapon on the ground, but its a good enough tradeoff to cycle 2 primaries to clear an area and circle back to upgrade weapons later.

 

I think I accidentally disabled the take function early on because I was worried about messing up the second weapon if it was a launcher.. I will take a look and see if its still needed and if not remove that part so take is re-enabled.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Possible to have it on Googledrive or Dropbox as well as on Steam please ?

Share this post


Link to post
Share on other sites
3 minutes ago, kremator said:

Possible to have it on Googledrive or Dropbox as well as on Steam please ?

 

11 hours ago, sammael said:

must have:exclamation:

please  can you provide non steam link?

 

Next update (within the next hour or so) I will add a dropbox & google drive link

 

Update will add keybind to switch weapon (User Action 16) and scroll wheel off by default.

The key will enable adding weapon to back, swapping dual primary weapons and swapping with a regular launcher. So an all in one key that could replace the normal swap to launcher key 3.

 

  • Like 5
  • Thanks 2

Share this post


Link to post
Share on other sites

Thankfully I said or so in that last update :eh:

You can really spam keybinds fast, which caused the ability to dupe weapons..

 

That took a bit longer to fix and now has updated.

 

Notes on the update: 

 

Added Keybind to add your primary weapon to your back, swap primary weapons as well as swap with a regular launcher if its there.

The hotkey will not work while a player has their inventory open, too many ways to dupe with this!

The scroll wheel/Addaction is now off by default. Make use of those keybinds!

Bind UserAction / Custom Controls 16 to any key you would like to enable a key switch. I would recommend binding it to 3, since it works with swapping to a normal launcher as well as swapping primaries. 

A fix to the take eventhandler was made, and all take actions (take hand) features were added back. 

 

@kremator @sammael Extra download links provided on the main post.

  • Like 3
  • Thanks 3

Share this post


Link to post
Share on other sites

Hello there Andrew_S90 !

 

are you thinking of  making also a script for this ?

  • Like 1

Share this post


Link to post
Share on other sites
17 hours ago, GEORGE FLOROS GR said:

Hello there Andrew_S90 !

 

are you thinking of  making also a script for this ?

It is impossible to do exactly what I am doing with a script, so no. There are other weapon scripts that act like mine but are all virtual and allow a launcher + two weapons but are in script form.

  • Like 1

Share this post


Link to post
Share on other sites

This mod has been updated - Fixed a duping method and added mod support for Iron Front A3, Faces of War and Aegis Mod.

  • Like 1
  • Thanks 2

Share this post


Link to post
Share on other sites
16 minutes ago, CPT J. Shaw said:

How does this mod behave in dedicated multiplayer?

Quite a few exile servers are running it right now and they seem to be all going OK.

Share this post


Link to post
Share on other sites

I am so glad I stumbled onto this!

 

Look out Haleks' Zombies, I got a 12.7mm fo yo azz!

I might actually have to leave the office early today to go try this out haha.

  • Like 1

Share this post


Link to post
Share on other sites

I cant get this working on dedi mp, it loads up fine in self hosted, but on my dedi players get stuck on an infinite loading screen.

Share this post


Link to post
Share on other sites
6 hours ago, SnakeDocc said:

I cant get this working on dedi mp, it loads up fine in self hosted, but on my dedi players get stuck on an infinite loading screen.

Checked the .rpt log?

Share this post


Link to post
Share on other sites

Nothing other than listing the mod along with the others that are being loaded.

Haven't been able to look at my client one yet, it's not filling anything out past the main men for some random reason.

Wasn't sure if there was something I missed to make it work on dedi or a known mod conflict

Share this post


Link to post
Share on other sites

Hi Andrew,

 

Thanks for sharing this really useful script with us. I love the usability of it being hotkeyed. I have found a small issue however.

When switching a weapon to the launcher/dual position, the textures on that weapon appear to change on some.

For example, I equip a Khaki SPAR16 in the primary slot and take an SPMG from a weapons box,  then switch them, the SPAR changes to Black.

I tried it with SMA as well and found a similar thing happening. Is it possible that they are reverting to a default texture?

Or perhaps there is a different classname for the different textures and your script only contains one classname?

 

Also, just wondering if you plan to add Project Zenith support at some point. I understand that right now it would be a bit like chasing your tail whilst the 

mod is still in alpa, but perhaps once it is closer to version 1.0?

 

Thanks again mate. Great work, much appreciated.:drinking2:

Share this post


Link to post
Share on other sites

Very nice mod, sad that a mission script version can't be done, but one more extra dependency should not hurt..
However I have found an Issue, when switching a mod weapon from the 2nd slot, instead of taking the weapon into hand the handgun is being pulled out. This does not affect vanilla weapons tho. Also experiencing the same issue as discororo described and it affects all of the weapons.

  • Like 2

Share this post


Link to post
Share on other sites

Have this pistol bug too. Sad, cause because of this I cant use this cool mod

Share this post


Link to post
Share on other sites

Hi Andrew_S90,

 

BWMOD has changed some of the classnames of the weapons. So you might change it in your mod too please?

 

Regards

Chaser

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

×