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: DarkSide (and me.. a little)
eMail: darkside@inficad.com
Difficulty Scale: Easy


Step 1
Uhh.. I just want to warn you every one, that this tutorial kinda sucks, since i only got the code sent WITHOUT the changes commented. Sorry about this. O'well.. read on if you want to create an Auto-Aiming thunder Bolt!

Step 2
Ok, now open up the weapons.qc file, and scroll down to the W_FireLightning section. delete *all* of it, and replace it with the code shown below? How much easier can it get?
void() W_FireLightning =
{
        local   vector          org;
    local   float       cells,damage=0;
    local   entity      head;

        self.punchangle_x = -2;
        self.currentammo = self.ammo_cells = self.ammo_cells - 1;
        org = self.origin + '0 0 16';

    if (self.ammo_cells < 1)  // Change to other weapon if not enough cells
        {
                self.weapon = W_BestWeapon ();
                W_SetCurrentAmmo ();
                return;
        }
    if (self.waterlevel > 1)  // explode in water
        {
                cells = self.ammo_cells;
                self.ammo_cells = 0;
                W_SetCurrentAmmo ();
                T_RadiusDamage (self, self, 35*cells, world);
                return;
        }

    head = findradius(self.origin, 250);  // finds all entitys within 250 (2.5 meters?)
        while (head)
        {
        if (head.takedamage)
        {
            if(head != self)  // if the entity (head) is you (self), skip
            {
                WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
                WriteByte (MSG_BROADCAST, TE_LIGHTNING2);
                WriteEntity (MSG_BROADCAST, head);  // Start position for lightning
                WriteCoord (MSG_BROADCAST, org_x);  // Your position
                WriteCoord (MSG_BROADCAST, org_y);
                WriteCoord (MSG_BROADCAST, org_z);
                WriteCoord (MSG_BROADCAST, head.origin_x);  // entity's position
                WriteCoord (MSG_BROADCAST, head.origin_y);
                WriteCoord (MSG_BROADCAST, head.origin_z);
                sound (head, CHAN_WEAPON, "weapons/lhit.wav", 1, ATTN_NORM);
                damage = 40 + random()*20;
                T_Damage (head, self, self.owner, damage);
            }
        }
        head = head.chain;  // cycle to next head (entity)
        }
};


Step 3
And that's it... Compile it, and load it up the usual way. Now, try loading up e1m1 in skill 3. go the the "slime bridge" or whatever i should call them, and take 'em all out in one shot! Cool, eh?






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.