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: MaNiAc
eMail: stevet@thevision.net
Difficulty Scale: Easy


Step 1
This is a VERY simple tutorial on how to make a "Vampire Axe." A "Vampire Axe" gives the amount of damage it deals to its owner. Now that the into is over with, lets get started!

Find the beginning of the function for swinging your axe.(This line is very near the beginning of weapons.qc) The line should be:

void() W_FireAxe =

Step 2
Scroll down from there until you find the following lines: (starting at line 50)
        if (trace_ent.takedamage)
        {
                trace_ent.axhitme = 1;
                SpawnBlood (org, '0 0 0', 20);
                T_Damage (trace_ent, self, self, 20);
        }
};

Step 3
Change the lines listed above to the following: (Note that the line "T_Damage (trace_ent, self, self, 20);" from the original has been changed to "T_Damage (trace_ent, self, self, 15);" because the "Vampire Axe" should be weaker than the original due to its new "power.")
        if (trace_ent.takedamage)
        {
                trace_ent.axhitme = 1;
                SpawnBlood (org, '0 0 0', 20);
                T_Damage (trace_ent, self, self, 15);   //Do only 15 damage.
                //ADD THE NEXT 8 LINES!!!!
                if(trace_ent.classname == "door")      
                        return;                         //Don't give life for secret doors.
                if (self.health >= 100)
                        return;                         //Don't give life over 100.
                else
                        self.health = self.health + 15; //Give 'em +15 health.
                if (self.health > 100)
                        self.health = 100;              //Make sure they don't go above 100 health.
        }

Thats it! As they say, "just compile it and yer ready!" Prepare to have hours o' fun with your new "Vampire Axe"!






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.