I asked if someone could make a simple gun jamming script on the FP 1985 message boards. It turned out pretty good as far as my response.
I wanted something simple to add a bit more intensity to deathmatch or co-op play. Weapon jamming seemed like the right way to go.
The original thread is here
http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?s=dbe977104718286db4c9524db06ef418;act=ST;f=7;t=37321;st=0The code looks like this:
init_events.sqs is called from a trigger with
thislist exec"init_event.sqs"
in it's activation string
init_events.sqs
_list = _this
_count = count _list
_i=0
#loop
(_list select _i) addEventHandler ["fired",{_this exec "Jam.sqs"}]
_i = _i + 1
?(_i < _count ):goto"loop"
The main code:
;;-----------------------------------------------------
;;{_x addeventhandler ["fired", {_this exec "jam.sqs"}]} Foreach Units groupname
;;or
;;this addeventhandler ["fired", {_this exec "jam.sqs"}]
;;Gunjam.sqs
;;-----------------------------------------------------
_unit = _this select 0
?(_this select 3=="FullAuto")||(_this select 3 == "Burst")||(_this select 3 == "Single"):goto "Jam"
exit
#Jam
_x = random 320
? (_x <= 1):goto "Jam2"
Exit
#Jam2
_unit playmove "CombatReloadMagazine"
_unit groupchat "Gah, my gun is jammed!"
exit
This was made originally by Harkonin and Mr.Zig was nice enough to improve it to the final result as seen here.
I was just wondering however. Since this script isn't by any means perfect although fun to use. It uses the rifle grenade loading animation to simulate the appearance of clearing a jam. So because the script does not differentiate between pistols and rifles. It still tries to play that animation when a pistol activates the script.
Is there any way around that? So that pistols perhaps at best don't activate the script at all if there's no workaround animation wise?Ideally making different jam frequencies for different weapons would be even better but I've heard that it would turn the script into a large unworkable mess of sorts.
I just wondered if anyone more script savvy had anything insightful to contribute in regard to this interesting script.