Jump pad Tutorial

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: Soul Keeper
eMail: errorabove@hotmail.com
Difficulty Scale: Easy


This tutorial will show you how to make the a Targetting System which will really make the target easier to see in the dark. The code will search within a range that varies according to the players health for an entity that can take damage and is visible.

* I wrote this code in about 2 minutes including test time
* I'm not responsible for any trouble this may cause you

Step 1:
First, we need to make the damn function. So, open your weapons.qc and find the function W_WeaponFrame ();. Now above that function add this one. This is our new and improved Target System...... yeah right!!!

void() target_system =
{
	local float mega;  // variable to see how far to find enemies
	if (self.health >= 100)  // Used to set how far to find enemies
		mega = 600;
	else if (self.health >= 90)
		mega = 500;
	else if (self.health >= 80)
		mega = 400;
	else if (self.health >= 70)
		mega = 300;
	else if (self.health >= 60)
		mega = 200;
	else
		mega = 100;
	local entity en1;
	en1 = findradius (self.origin, mega);  // find you some enemies
	while (en1)
	{
		if ((en1.takedamage == DAMAGE_AIM && en1 != self) && visible(en1))
		{
			particle (en1.origin, '0 0 20', 244, 20);  // make my beautiful effects
			centerprint (self, "Enemy Target");  //  reports any enemies found
		}
		en1 = en1.chain;  // do over and find another
	}
};
Step 2:
Now you actually need to look into the function W_WeaponFrame ();, and right after that first bracket you need to add the following.

	target_system ();
Step 3:
Now you can compile my wonderful code and play with the cool gadgets. That's about it for right now. I'll give you some more tutorials later. Well.... c'ya!!!







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.