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: Medium


Step 1
Hi again... another cool tutorial from the one and only ShockMan :)
In this tutorial we will make the player "bleed" if he gets low on health...
First open up combat.qc and add the following to the start of that file.
void(vector org, vector vel, float damage) SpawnBlood;
after that find "void() T_Damage" and in that function find:
if (targ.health <= 0)
{
        Killed (targ, attacker);
        return;
}
before this add:
if (targ.health <= 20) // set 20 to the health you want the bleeding to start
{
        targ.bleed = TRUE; // bleed
}


Step 2
Now we have to open up defs.qc and at the end add:
.float bleed;


Step 3
then open client.qc and find the function "PlayerPreThink" and in that function, find:
WaterMove ();
and after that add:
If (self.bleed == TRUE)
        Bleeding(self);
then go to combat.qc again, and at the end add this:
void(entity org) Bleeding =
{
        SpawnBlood (org.origin, '0 0 0', 70); // make the blood
};


Step 4
That's it.. have fun!






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.