Jump to content
Sign in to follow this  
SicSemperTyrannis

Full Auto Pistol/Rifle/Etc Proof of Concept

Recommended Posts

_mdEvent = player getVariable["mdEvent", -1];
_muEvent = player getVariable["muEvent", -1];

if(_mdEvent > -1) then { findDisplay 46 displayRemoveEventHandler ["MouseButtonDown", _mdEvent]; };
if(_muEvent > -1) then { findDisplay 46 displayRemoveEventHandler ["MouseButtonUp", _muEvent]; };

player removeAllEventHandlers "Fired";

player setVariable["mdEvent", findDisplay 46 displayAddEventHandler ["MouseButtonDown", 'player setVariable["firing", true];']];
player setVariable["muEvent", findDisplay 46 displayAddEventHandler ["MouseButtonUp", 'player setVariable["firing", false];']];

player addEventHandler["Fired", { 
player setVariable["lastFiredEvent", time];

[] spawn {
	_currentTimeVariable = player getVariable["lastFiredEvent", 0];

	while{(_currentTimeVariable == player getVariable["lastFiredEvent", 0]) && ((player ammo (currentWeapon player)) != 0) && (player getVariable["firing", false])} do {
		player forceWeaponFire [currentWeapon player, currentWeaponMode player];
		sleep 0.001;
	};
};
}];

Made this to have it as an option to buy at an ingame shop, it's really, really filthy and could use some retooling but it does work.

Share this post


Link to post
Share on other sites

Awesome! And before anyone says this is unrealistic:

(Sorry, couldn't resist xD)

Share this post


Link to post
Share on other sites

well, would be better ive its a own fire mode, cause bump firing a pistol isnt always what you want :)

Share this post


Link to post
Share on other sites

Are you scripting a semi auto gun to fire full auto instead of a new config/addon?

Share this post


Link to post
Share on other sites

I'm scripting the pistol/single fire rifles to fire in full-auto mode, and yes it is accomplished with code there is no modification to game files.

Share this post


Link to post
Share on other sites
Any plan on adjusting the HUD to reflect the auto and burst modes?

If this actually makes it into one of my modes, sure. I don't see it happening right now, though, due to it's hacky nature.

Share this post


Link to post
Share on other sites

This looks interesting but I'm wondering what the application for this would be over, say, a config addon that adds automatic pistols or perhaps replaces pistols that already exist with automatic ones.

Share this post


Link to post
Share on other sites
This looks interesting but I'm wondering what the application for this would be over, say, a config addon that adds automatic pistols or perhaps replaces pistols that already exist with automatic ones.

In a post apocalyptic world, there's this un-certified gunsmiths kind of thing, and people go to that gunsmiths and modify their weapon. I think it's useful in that kind of mission. If there's a script error, blame it on the 'gunsmith'. It was by design since it's from uncertified gunsmith :D

Share this post


Link to post
Share on other sites
In a post apocalyptic world, there's this un-certified gunsmiths kind of thing, and people go to that gunsmiths and modify their weapon. I think it's useful in that kind of mission. If there's a script error, blame it on the 'gunsmith'. It was by design since it's from uncertified gunsmith :D

That was sort of the idea. I was going to allow players to 'illegally' modify their guns to full-auto after buying an upgrade.

Share this post


Link to post
Share on other sites

cool that you are able to do this, however im curious is this a addon for the influx in "kids" that have been playing arma 3 that run around on full auto? lol semi all the way, controlled shots are deadly shots. anyways, all jokes aside i could see some people using this for room clearing i suppose. keep it up

Share this post


Link to post
Share on other sites

Last I checked, does Wasteland (404 version) even have a gunsmith or is it just a weapons dealer?

Yeah, room clearing is pretty much the only way that the modified weapons are going to hold accuracy -- and if you're so concerned about "kids influx", Thedog88, don't you believe that they'll stick to ranges where that works? ;)

Share this post


Link to post
Share on other sites
That was sort of the idea. I was going to allow players to 'illegally' modify their guns to full-auto after buying an upgrade.

Ah, I get it!

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  

×