Introduction
Today, we're gonna screw up the everyday over-predictable rocket. This is VERY easy to do, it's so easy even a caveman can do it.
Step one!
Let's go over to WEAPONS.QC.
Head on down to W_FireRocket. Paste this above the W_FireRocket function:
void() RocketScrewUp =
{
self.velocity = ((self.velocity + ((v_right * 121.000) * crandom ())) + ((v_up * 121.000) * crandom ()));
self.nextthink = time + 0.08; // screw up fast
self.think = RocketScrewUp;
};
Obviously this puts this rocket randomly off course. Can work for other projectiles. Works great for insect guns like the HornetGun from Half-Life.
THE FINAL STEP ALREADY???
Go into the W_FireRocket function and find this:
// set missile duration
missile.nextthink = time + 5;
missile.think = SUB_Remove;
and change it to something like this
// set missile drunkation
missile.nextthink = time + 0.1; // Assume it's safe to screw away....
missile.think = RocketScrewUp;
And..........we are done. Compile and run. Fire the rocket. That wasn't so overwhelming was it? Now you can play fair with n00bs. Now autoaim won't serve a purpose.
Written in Feb 2002. Damn that's ancient!
This tutorial was written before I had even heard of QuakeC :O And look at me now! :D! And yes, I3D tutorials got me started!
(I think)