|
FAQ
• Search • Login
|
|
Page 1 of 1
|
[ 4 posts ] |
|
Burst Fire Taking Up Multiple Bullets
Author |
Message |
Hamjuice
Joined: Wed Jan 27, 2010 11:38 pm Posts: 36
|
Burst Fire Taking Up Multiple Bullets
Hey. I've got a mod that uses burst fire for two of the guns (it's in Releases), but I want to have each of the three-shot bursts take up three ammo instead of just one. How would I do this?
|
Wed Feb 10, 2010 1:38 am |
|
|
Contrary
Joined: Mon Mar 16, 2009 10:50 pm Posts: 2175 Location: Neverwhere
|
Re: Burst Fire Taking Up Multiple Bullets
You could do the thing that happens with alt fire guns. Where when you do something it changes to a different gun. Just every time it's fired change it to an identical gun with 3 less ammo count.
|
Wed Feb 10, 2010 7:30 am |
|
|
Lizardheim
DRL Developer
Joined: Fri May 15, 2009 10:29 am Posts: 4107 Location: Russia
|
Re: Burst Fire Taking Up Multiple Bullets
That would work, or you can use that ammo system that cavecricket used in his shotgun. Then you can have autofire that is innaccurate, bursts for medium range and semi auto for long ranges.
|
Wed Feb 10, 2010 8:09 am |
|
|
PhantomAGN
Joined: Mon Jun 29, 2009 2:40 am Posts: 610 Location: Deep below The Map of Mars
|
Re: Burst Fire Taking Up Multiple Bullets
I'm just pulling Lua out of the back of my head, but because you can activate weapons from scripts, then perhaps the burst mode could activate a counter which then fires the gun two more times is quick succession.
So: shoot -> first bullet gets the ID of the gun that fired it -> shot reads counter, IF counter < 3 then add one to counter and activate the gun again, Else set counter to 0 and destroy self
I'm not sure how your guns are set up though, so the firing rate might not be high enough to allow this to work. In that case one could incorporate code from the dual-mode gun template to actually switch to a gun that has a higher rate of fire, an switch back after.
That's all just pulled out of thin air, but unless I am very wrong it ought to work. Probably not the best way to do this though.
|
Wed Feb 10, 2010 6:26 pm |
|
|
|
|
Page 1 of 1
|
[ 4 posts ] |
|
Who is online |
Users browsing this forum: No registered users |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|