Semi-auto Firing

1996-06-22 InsideQC tutorials kleskby 0 104
Author: CheapAlert
Source: https://www.insideqc.com/qctut/qctut-76.shtml

Author: CheapAlert
Source: https://www.insideqc.com/qctut/qctut-76.shtml

You probably have played Counter-Strike and fired the pistol, that you have to keep clicking rapidly to start the usual everyday argue fight on a CS server. Well today we're gonna make the shotgun fire like a pistol from CS. It's easy. It'll take Quake a step closer to the worst game in the history of games. Except that this turns the shotgun into a trustworthy riotgun.

Step 1.
First break into DEFS.QC, drop down to the bottom edge of the file, hit enter several times, then type in:
.float semi; // CHP - Semiauto
Save and close DEFS.QC.

Step 2.
Open WEAPONS.QC. Go to W_Attack function find:


 else if (self.weapon == IT_SHOTGUN)
 {
 player_shot1 ();
 W_FireShotgun ();
 self.attack_finished = time + 0.5;
 }

change to:


 else if (self.weapon == IT_SHOTGUN)
 {
 if(!self.semi){
 player_shot1 ();
 W_FireShotgun ();
 self.semi = 1; // chpsemiauto
 self.attack_finished = time + 0.1; // faster
 }
 }

 

What you see above is the place where once you hold the trigger, it fires once. Pretty much the same way ID did to stop the Quake guy from pogo-stick jumping.

Step 3.
Scroll down to W_WeaponFrame, at this part of the function:


// check for attack
 if (self.button0)
 {
 SuperDamageSound ();
 W_Attack ();
 }

Above the first line, add:


// CHP - Semi Auto Tutorial
 if (!self.button0)
 self.semi = 0; // CHP - Semi Auto Trigger

Save, compile and run. Now pump them with pellets. Repeatedly. Until you get your carpal tunnel syndrome. Enjoy.



Tags: tutorial, quakec, qc, insideqc, weapon
Owned by kleskby#1837
Telegram
Close

You have no new notifications.


You have no new messages.