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: James Layman
eMail: drywall@telefragged.com
Difficulty Scale: Easy


Step 1
In this tutorial, you will learn how to make Ogres fire nails and grenades. As always, open up your text editor. Then open up ogre.qc

Step 2
In ogre.qc, right below the void OgreFireGrenade, paste this:
/*
================
OgreFireSpike
================
*/

void() OgreFireSpike =
{
    local vector dir;
    local entity old;

    sound (self, CHAN_WEAPON, "weapons/spike2.wav", 1, ATTN_NORM);
    self.attack_finished = time + 0.2;

    dir = normalize (self.enemy.origin - self.origin);

    launch_spike (self.origin + '0 0 16', dir);

    newmis.touch = superspike_touch;
    setmodel (newmis, "progs/s_spike.mdl");

    setsize (newmis, VEC_ORIGIN, VEC_ORIGIN);
};
Well, what that was was basically a modified version of the player's firespike void. The direction was changed, and a few things were removed, like the ammo reduction.

Step 3
Below the OgreFireSpike void, put in this one. This void will randomize the ogre's choice of attack. I've weighted it twoards the nailgun, but you can change it if you like.
/*
================
=Spikes or Grenades?=
================
*/
void() ChoozAtak =
{
    local float SoG; // creates a variable number, SoG

    SoG = random (); // randomizes SoG

    if (SoG > 0.3) // 70% chance for spike
    {
        OgreFireSpike();
    }
    else
    {
        OgreFireGrenade();
    }
};


Step 4
Ok, now Scroll down to the line:
void() ogre_nail4       =[      $shoot3,                ogre_nail5      ]
{ai_face();OgreFireGrenade();};

And change it to:

void() ogre_nail4       =[      $shoot3,                ogre_nail5      ]
{ai_face();ChoozAtak();};


Step 5
Now, all you have to do is save it and compile.






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.