Inside3D tutorials.

Inside3D
 • Front Page
 • Articles
 • Downloads
 • Forums
 • Hosting
 • Help Wanted
 • Interviews
 • Reviews
 • Staff

 
Allied Sites
 - AI Cafe
 - Bot Epidemic
 - Dark Places
 - Flat Earth
 - FrikBot
 - Ghoulish Art
 - Kilbert3D
 - Quake Info Pool
 - QSG: Quake Standards
 - Rusted Fork
 - Stroggs Gone Mad
 - More...
 
Quake
 - Getting Started
 - QuakeC Specs v1.0
 - QuakeC Tutorials
 - Quake Mod Index
 
Quake II
 - Getting Started
 - dll Sourcecode
 - Coding Tutorials
 
.dll Central
 - Getting Started
 - Learning
 - dll Primer
 - dll in C
 - dll in Delphi
 - Compilers
 
Jedi Knight
 - Getting Started
 - COG Specs
 - Sound Specs
 - Tutorials
 
Level Editing
 - Tutorials/Tips
 
 
Telefragged!!!
Created By: ShockMan
eMail: qfiles@quakemania.com
Difficulty Scale: qfiles@quakemania.com


Step 1
Ok, a little chase cam tutorial for the people...

First open up defs.qc and add this line at the bottom of the file:

	.vector camview;
Second, open client.qc goto PutClientInServer and after:
	DecodeLevelParms ();
	
	W_SetCurrentAmmo ();
add:
   	if ( self.aflag )
		CCamChasePlayer ();
then in PlayerPreThink after:
	if (self.view_ofs == '0 0 0')
		return;		// intermission or finale
add:
   	if ( self.aflag )
		CCamChasePlayer ();
then in weapons.qc goto ImpulseCommand and add:
   	if (self.impulse == 15)
		CCam ();


Step 2
Then comes the big part... make a new file called ccam.qc and add this:
void () CCam;

  void () CCamChasePlayer = 
  {
     makevectors (self.v_angle);
     traceline ((self.origin + self.view_ofs),((((self.origin + self.view_ofs)
       + (v_forward * self.camview_z)) + (v_up * self.camview_x)) + (v_right * self.camview_y)),FALSE,self);
     setorigin (self.trigger_field,trace_endpos);
     WriteByte (MSG_ONE,5);
     WriteEntity (MSG_ONE,self.trigger_field);
     self.weaponmodel = "";
  };

  void () CCam = 
  {
     local entity camera;
     local entity spot;

     if (self.aflag == FALSE) 
     {
        self.aflag = TRUE;
        camera = spawn ();
        spot = spawn ();
        self.trigger_field = camera;
        camera.classname = "camera";
        camera.movetype = MOVETYPE_FLY;
        camera.solid = SOLID_NOT;
        setmodel (camera,"progs/eyes.mdl");
        setsize (camera,'0 0 0','0 0 0');
        makevectors (self.v_angle);
        traceline ((self.origin + self.view_ofs),(((self.origin + self.view_ofs)
           + (v_forward * -64.000))),FALSE,self);
        self.camview = '0 0 -64'; // added
        setorigin (camera,trace_endpos);
        camera.angles = self.angles;
        self.weaponmodel = "";
        msg_entity = self;
        WriteByte (MSG_ONE,5);
        WriteEntity (MSG_ONE,camera);
        WriteByte (MSG_ONE,10.000);
        WriteAngle (MSG_ONE,camera.angles_x);
        WriteAngle (MSG_ONE,camera.angles_y);
        WriteAngle (MSG_ONE,camera.angles_z);
        sprint (self,"Chase Cam On\n");
      }
      else
      {
        self.aflag = FALSE;
        msg_entity = self;
        WriteByte (MSG_ONE,5);
        WriteEntity (MSG_ONE,self);
        WriteByte (MSG_ONE,10);
        WriteAngle (MSG_ONE,self.angles_x);
        WriteAngle (MSG_ONE,self.angles_y);
        WriteAngle (MSG_ONE,self.angles_z);
        remove (self.trigger_field);
        sprint (self,"Chase Cam Off\n");
        W_SetCurrentAmmo ();
     }
  };



Step 3
Now just add ccam.qc to progs.src before weapons.qc and run Quake, type impulse 15 in the consol and there ya go!! :)






The Inside3D content and design is copyrighted by the Inside3D team, and may not be re-produced or copied without proper consent. All rights reserved. Any work credited to any author not part of InsideQC is copyrighted by that author. If you have any feedback, suggestions or flames please send it in to the author. Inside3D is hosted by telefragged and the design was originated by project-9.