Scripts / Make gun fail shoot

Author
Message
gaku95
4
Years of Service
User Offline
Joined: 2nd Dec 2020
Location: Buenos Aires, Argentina
Posted: 9th Jan 2021 17:48
Hi, im trying to design a level where the player shoots to enemies but his gun may fail from time to time in a random way.
What should i have in mind to make a script for this?
PM
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 9th Jan 2021 19:07
you mean jam? there's already a mechanic for it, use the uzi as a reference - look at the gunspec in gamecore\guns\modern\uzi folder
;// Reliability

overheatafter = 1
cooldown = 1000
jamchance = 0

alt overheatafter = 1
alt cooldown = 100
alt jamchance = 5
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
gaku95
4
Years of Service
User Offline
Joined: 2nd Dec 2020
Location: Buenos Aires, Argentina
Posted: 9th Jan 2021 22:33
Thank you for your answer!
So jamchance stands for the probability of the gun failing on shooting? Is it a percentage?
PM

Login to post a reply

Server time is: 2024-12-22 02:22:19
Your offset time is: 2024-12-22 02:22:19