Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Sniper Fireing Rate

Author
Message
old_School
15
Years of Service
User Offline
Joined: 29th Aug 2009
Location:
Posted: 28th Sep 2009 23:26
Ok so im wanting to adjust the sniper fireing rate. To be slower. I think I know how just wanna make sure here. Here is the regular sniper fire script.


;Artificial Intelegence Script

;Header

desc = Snipe Shoot

;Triggers

:ifweapon=0:reloadweapon,state=1,animate=31,sound=audiobank\\guns\\reload.wav
lrcanbeseen:settarget,rotatetotarget,resethead
lrdistwithin=200:rotatetoplr,resethead

:state=0,random=50:rotateheadrandom=65
:state=0,shotdamage=1:state=7
:state=0,ifweapon=1,plrcanbeseen:state=2

:state=1,random=50:rotateheadrandom=65
:state=1,random=100:state=0,animate=1
:state=1,plrcanbeseen:state=0,animate=1

:state=5:useweapon,rundecal=6,state=0
:state=4:state=5
:state=3:state=4
:state=2:state=3

:state=7,random=1:state=8
:state=7,random=1:state=10
:state=7:settarget,rotatetotarget,state=1,animate=31

:state=8:state=9,setframe=3
:state=9:incframe=3,strafe=-90,rotatetoplr
:state=9,frameatend=3:state=1,animate=1
:state=10:state=11,setframe=3
:state=11:incframe=3,strafe=90,rotatetoplr
:state=11,frameatend=3:state=1,animate=1

;End of Script



Now I belive this last section defines how fast to fire right here
:state=8:state=9,setframe=3
:state=9:incframe=3,strafe=-90,rotatetoplr
:state=9,frameatend=3:state=1,animate=1
:state=10:state=11,setframe=3
:state=11:incframe=3,strafe=90,rotatetoplr
:state=11,frameatend=3:state=1,animate=1

Now I think the 3 is the fire rate so if I raised it to say maybe 5 or 6 this should slow down the fireing rate correct?
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 29th Sep 2009 07:58
The section you're pointing to is for strafing, not firing the weapon.

State 5 is for firing the weapon, and what you can do is add a "random=X" condition to that line to make the enemy fire less often.


The one and only,


Bibo4PC
16
Years of Service
User Offline
Joined: 17th Oct 2008
Location: Middle Earth
Posted: 29th Sep 2009 10:35
or maybe you can use rateoffire

old_School
15
Years of Service
User Offline
Joined: 29th Aug 2009
Location:
Posted: 29th Sep 2009 18:03
ok So this line

:state=5:useweapon,rundecal=6,state=0

make it?

:state=5:useweapon,random=X,state=0

not sure i follow sorry
Alt Schule
17
Years of Service
User Offline
Joined: 19th Apr 2007
Location: In Your Mind
Posted: 29th Sep 2009 18:10
Nope. You'll need to add a numeric value to:

RANDOM=

The X was a placeholder.


old_School
15
Years of Service
User Offline
Joined: 29th Aug 2009
Location:
Posted: 29th Sep 2009 21:34
well yeah lol jusrmaking sure thugh i do away with the decal=6 replace with something like random=10 or something
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 29th Sep 2009 21:35
Random=X is a condition.

And why are you replacing things? Don't you think that's just a little unwise? Leave the "rundecal=6" action where it's at.


The one and only,


old_School
15
Years of Service
User Offline
Joined: 29th Aug 2009
Location:
Posted: 29th Sep 2009 21:50
:state=5:useweapon,rundecal=6,random=10,state=0

So the line looks like this?
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 29th Sep 2009 22:01
I said "random=X" is a condition. Conditions go on the left side of the colon, where the "state=X" is at.

I swear, people read my tutorials for the first month or so, and then it's like they never existed.
Anyway, you can find them in the community guide, which should be found in your "FPS Creator/Docs" folder.


The one and only,


PW Productions
15
Years of Service
User Offline
Joined: 13th Mar 2009
Location: sitting in a chair.
Posted: 11th Oct 2009 07:42
Yes, Ply's tutorials are great; I really got into scripting after reading them. I'm working on a Zombie Panic game right now trying to do wave spawning and it's slightly working. Also trying to make my own Random Weapons Chest and money/barrier system.

You should really read Ply's tutorials, you'll nearly never ask a question again.

<a href="http://www.fpsfree.com/">fpsFREE for First Person Shooter Content</a>

Login to post a reply

Server time is: 2024-11-25 07:43:59
Your offset time is: 2024-11-25 07:43:59