Abbe 0 Posted November 10, 2007 Just a question to all the talented addon-makers: How about a weapon jam, the propability of a weapon malfunction? Can it be done in a nice way, maybe with an animation and sound "un-jaming" the weapon? /Abbe Share this post Link to post Share on other sites
m4r1ne 0 Posted November 10, 2007 maybe, best id say they can do is just make it use the reload anim for a jam. I remember seeing that somewhere......I think a vietnam mod for OFP had a anim for unjamming your weapon, but it got annoying, it jammed like every 2 mags. Got me killed lots Share this post Link to post Share on other sites
hypno toad 0 Posted November 11, 2007 maybe, best id say they can do is just make it use the reload anim for a jam. I remember seeing that somewhere......I think a vietnam mod for OFP had a anim for unjamming your weapon, but it got annoying, it jammed like every 2 mags. Got me killed lots That's the M16 for you Share this post Link to post Share on other sites
Kerry 0 Posted November 11, 2007 that would be verryyyyyy kool. Add to the realism alot! If someone is willing to make the anim tho... Share this post Link to post Share on other sites
Abbe 0 Posted November 11, 2007 As a start of this "addon" the anim is not very importante I think, the concept of a weapon malfunctioning with the right % is. Same as for MG's, a barrelchange if to hot would also do tons to the experiance of combat. Maybe the AI is the problem with this ideas or they would have been done ages ago...? /Abbe Share this post Link to post Share on other sites
mr burns 132 Posted November 11, 2007 Problem with malfunction % rate is that ArmA cares shit about the numbers .. Been testing a weapon Jam Script with ViconX´ MG3 and the jams occured more often than the percentage would have implied to. Sometimes just after fixing a jam another one would happen a few bullets (like 40 or so) later Share this post Link to post Share on other sites
Wolfrug 0 Posted November 11, 2007 @Burns I think this might have something to do with the "fired" eventhandler (which I assume you're using): I've tried something similar (for another purpose, though), and despite only having like a 5% chance of happening, it did occur quite a lot more often than it "should" have, especially when firing burst/full auto. There was another discussion regarding ROF and framerates in a thread someplace around here: apparently the weapons can theorethically fire at their real rates of fire (which is, naturally, a helluva lot), but it depends on framerate. Maybe something similar can be applied to the fired eventhandler (it fires too much/too little?) -> Try a test, make a counter go up everytime the fired eventhandler is triggered, and shoot a clip at different framerates (in desert, into the air, in city, in forest etc) and see if it counts the full mag. Who knows...might be some interesting effects. Regards, Wolfrug Share this post Link to post Share on other sites
Winters1807 0 Posted November 11, 2007 my old clan made an addon that used this idea of weapon blockages, but i think that it was done in the way that there was a certain percentage chance that there would be a jam, however, when using weapons with high rpm, like the 249, jams would be very very frequent making the weapon next to useless, as a higher rpm, gives a higher chance of jamming, according to this script. Maybe if there was an individual script for each weapon it could work Share this post Link to post Share on other sites
Q1184 0 Posted November 12, 2007 Ok here is my attempt at jamming weapons: q11_jams v.0.1a Features: - jamming probability is defined in weapon config, may be defined individually for each weapon - affected weapons: all M16 and M4, M249 - on jam you are given an action called "Immediate action". In 90% of cases performing it will solve the problem. In 10% it will fail and you will given an action called "Remedial action". In 80% it will solve the problem, and in 20% the weapon will be deemed completely irrepairable. - requires extended init and fire eventhandlers. Known bugs: - sounds for immediate/remedial action will be "not found" if used with GMJ_sightadjustment mod (no idea why, something with CfgSounds for his click and my actions ) - causes error and doesn't work with the latest MattArmaEffects (something with Fired eventhandler). Previous version is alright. To change the jamming probability open config.cpp, find your weapon config and change Jam_prob value. This is my first scripting experience, and this is just an alpha version, so any help and suggestions are appreciated. Share this post Link to post Share on other sites
Abbe 0 Posted November 12, 2007 puh...you're becoming my ArmA-hero, recoils and now this...don't know if that's good or bad! Â Will test this all night, be sure! If this works you've fixed something that has been broken in a "simulation" since Ofp was relesed! Â /Abbe Share this post Link to post Share on other sites
mr burns 132 Posted November 12, 2007 Will AI weapons jam too? And do those silly idiots fix it themselves? If not it´d be quite useless, unless you want to cheat on yourself Share this post Link to post Share on other sites
Abbe 0 Posted November 12, 2007 Well, I guess this is one of the tricky things to do, let tha AI fix it's own weaponjam. But we can try can't we Mr Burns?  Thing I would suggest: * More weapons! As with Sickboys wonderful tracers, the community can agree on the propability of a malfunction. If someone thinks different, editable config, as you've made it, is perfect!  * Get rid of the acctual reloading. Using anims and sounds of the reloading is to me just fine (maybe doubble the anims and sounds as a bigger punishment for beeing affected by Murphy's law?  ) but if possible no changing of magazine. * And now...let the AI have the chance of having just as a bad day as we can unjaming hardware in the worst timing  /Abbe Share this post Link to post Share on other sites
NoRailgunner 0 Posted November 12, 2007 Maybe AI should say: "D'oh!" - if they can't fix jamming Share this post Link to post Share on other sites
mr burns 132 Posted November 12, 2007 Well, I guess this is one of the tricky things to do, let tha AI fix it's own weaponjam. But we can try can't we Mr Burns? That´s the true OFP spirit we need over here Unfortunately i don´t know shit about scripting so won´t be much of a help. Maybe AI should say: "D'oh!" - if they can't fix jamming They do, at least via radio msg´s Here´s the script i used, didn´t write it myself so pls don´t ask me any questions about it. <-- scripting noob <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;;----------------------------------------------------- ;;{_x addeventhandler ["fired", {_this exec "EH_jam.sqs"}]} Foreach Units groupname ;;or ;;this addeventhandler ["fired", {_this exec "EH_jam.sqs"}] ;;Gunjam.sqs ;;----------------------------------------------------- _unit = _this select 0 ?(_this select 3=="FullAuto")||(_this select 3 == "Burst")||(_this select 3 == "Single")||(_this select 3 == "VX_FullAuto_MG3"):goto "Jam" exit #Jam _x = random 755 ? (_x <= 4):goto "Jam2" Exit #Jam2 _unit playmove "AmovPercMstpSlowWrflDnon_seeWatch" _unit playmove "WeaponMagazineReloadStand" _unit groupchat "Verdammt, habe Ladehemmung!" exit Share this post Link to post Share on other sites
Q1184 0 Posted November 12, 2007 Quote[/b] ]Will AI weapons jam too? And do those silly idiots fix it themselves?If not it´d be quite useless, unless you want to cheat on yourself I think it's possible, just didn't get around to looking at it. Forcing the AI to reload his weapon must do the job. Quote[/b] ]* Get rid of the acctual reloading. Using anims and sounds of the reloading is to me just fine (maybe doubble the anims and sounds as a bigger punishment for beeing affected by Murphy's law?  ) but if possible no changing of magazine. This is a bit tricky, as there is no "pointer" to the magazine that's currently in use, so I would have to memorize the number of rounds in the magazine before the jam, remove all magazines, change the weapon to jammed, then after the remedial action add a magazine with the memorized number of rounds, add working weapon and add the rest of the magazines. While remembering the ammo count of a magazine and then making the weapon have it again is possible (but you'll have to config  29 magazines with respective amount of ammo, and think about M249 where it would be 199 magazines ), even though it's theoretically possible, i know of no way of remembering the ammo count of the rest of the magazines. So if at the moment of jam you had 1 magazine in the weapon with 15 rounds and 3 spare magazines with 1 round in each, after fixing the jam you would have 15 rounds in the weapon and 3 magazines with 30 rounds in it... Anyway, right now i'm more concerned with compatibility issues... Share this post Link to post Share on other sites
Abbe 0 Posted November 12, 2007 Fully understood! I think that making the AI jam as well as player should be the first priority of the things I mentioned. No bugs so far though /Abbe Share this post Link to post Share on other sites
-10thMT-Tack-Up 0 Posted November 12, 2007 I might sound like a noob, but i never use the EXT init. Handler, so how do i install this? Share this post Link to post Share on other sites
Q1184 0 Posted November 12, 2007 Tack-Up @ Nov. 12 2007,23:30)]I might sound like a noob, but i never use the EXT init. Handler, so how do i install this? I included them handlers in the archive, just place them all somewhere in an active modfolder. Share this post Link to post Share on other sites