[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - 6 round burst fire

6 round burst fire

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

6 round burst fire

Postby ooppee » Thu Apr 05, 2012 2:43 am

Having some issues with this and I know it's so simple.
Been trying to make a weapon that fires in a 6 round burst. I get the 6 round burst just fine and making it not fire if you have under 6 shots.
However what I am wanting is for it to fire in a burst regardless of the ammo it has. So if it has 4 shots left - fires 4 shots and stops.
That's the issue I have. Making it fire 6 shots with a single push of fire - but every shot of the burst subtracts one ammo. I presently only made it drop 6.
Using Nailgun ammo. Standard Nailgun would be single fire, Super would be the 6 round burst.
ooppee
 
Posts: 70
Joined: Thu Oct 28, 2010 2:57 am

Re: 6 round burst fire

Postby ceriux » Thu Apr 05, 2012 6:28 am

have it call the fire function 6 times instead of once?
User avatar
ceriux
 
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Re: 6 round burst fire

Postby Jukki » Thu Apr 05, 2012 8:51 am

You keed to add somekind of if (ammo) ammo = ammo - 1; where it calls the fire function (replace ammo eith the ammo float you use)
Jukki
 
Posts: 214
Joined: Wed Apr 07, 2010 4:59 am

Re: 6 round burst fire

Postby frag.machine » Fri Apr 06, 2012 12:04 am

I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Re: 6 round burst fire

Postby ooppee » Fri Apr 06, 2012 4:49 am

Got it to fire 6 shots at once - but it's firing all 6 at once like a shotgun - instead of actually firing in a burst.
ooppee
 
Posts: 70
Joined: Thu Oct 28, 2010 2:57 am

Re: 6 round burst fire

Postby Chip » Fri Apr 06, 2012 7:22 am





Fear not the dark, but what the dark hides.
User avatar
Chip
 
Posts: 575
Joined: Wed Jan 21, 2009 9:12 am
Location: Dublin, Ireland

Re: 6 round burst fire

Postby Seven » Fri Apr 06, 2012 12:28 pm

Hello OoPpEe,

its good to see you back active.

I would edit W_Attack () which is called once inside W_WeaponFrame ().
Add a loop like frag.machine suggests into it to call your final "W_Fireyournewweapon ()" 6 times.
This way you will have your 6 bullets shoot via one mouse click, but not all at once. Like you wanted.
Adjust your "self.attack_finished" if necessary.

Maybe this can be helpful somehow.

Best wishes for you project OoPpEe.
Seven
Seven
 
Posts: 301
Joined: Sat Oct 06, 2007 8:49 pm
Location: Germany

Re: 6 round burst fire

Postby Dr. Shadowborg » Fri Apr 06, 2012 8:37 pm

Actually, the quick and easy solution is to look at the nailgun frame animation code. Just remove the stuff having to do with self.button0 and replace it with .ammo checks to make it exit the animation loop if you run out of ammo / exit if 6 shots have been fired.

And before anybody asks, no I still don't have any time to do that tutorial series I was planning. (...let alone attempting to do that custom engine for Hellsmash I've been needing, or anything else for that matter. :( )
User avatar
Dr. Shadowborg
InsideQC Staff
 
Posts: 1120
Joined: Sat Oct 16, 2004 3:34 pm

Re: 6 round burst fire

Postby ooppee » Fri Apr 06, 2012 10:10 pm

ooppee
 
Posts: 70
Joined: Thu Oct 28, 2010 2:57 am

Re: 6 round burst fire

Postby Seven » Sat Apr 07, 2012 1:46 pm

Now it should be possible to make your 6-burst code.

By the way:
It has been a long time since I played Daikatana.
But i remember that the futuristic shotgun in Daikatana has exactly the same function:
Push your mouse button once and fire several shots in a row.
That weapon was cool to use and it had a fantastic sound.

Maybe the Daikatana source code is available ?
Then you could just copy it :)
Seven
 
Posts: 301
Joined: Sat Oct 06, 2007 8:49 pm
Location: Germany

Re: 6 round burst fire

Postby ooppee » Sat Apr 07, 2012 5:03 pm

ooppee
 
Posts: 70
Joined: Thu Oct 28, 2010 2:57 am

Re: 6 round burst fire

Postby ooppee » Sat Apr 07, 2012 11:20 pm

ooppee
 
Posts: 70
Joined: Thu Oct 28, 2010 2:57 am

Re: 6 round burst fire

Postby Dr. Shadowborg » Sun Apr 08, 2012 3:57 pm

User avatar
Dr. Shadowborg
InsideQC Staff
 
Posts: 1120
Joined: Sat Oct 16, 2004 3:34 pm

Re: 6 round burst fire

Postby Alex » Mon Apr 09, 2012 1:44 pm

Alex
 
Posts: 24
Joined: Sun Feb 13, 2011 6:24 pm

Re: 6 round burst fire

Postby Seven » Mon Jun 04, 2012 3:50 pm

Hello,

I am sorry for bumping this, but I just found a mod that does it with 4 rounds
and ontop of that this mod adds additional things to many weapons (depending on how you put the mouse button).
You can also download the source.

The guy is called moatdd. He made this around 3 years ago.
If this was discussed earlier, I am sorry for bumping and repetitiveness.

Here are his explanation clips:
http://www.youtube.com/watch?v=HL77cYQ4 ... ure=g-vrec
http://www.youtube.com/watch?v=I15zNLs6 ... ature=plcp

Sorry if this is old news for you.
I found the mod ideas quite interesting and wanted to mention it.
Seven.
Seven
 
Posts: 301
Joined: Sat Oct 06, 2007 8:49 pm
Location: Germany

Next

Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest