This mod has no zip file because it does NOT need one! ======================================================================= Title : Lob AI Filename : lob_ai.txt Version : 1.1 Date : March 3, 1998 (3/3/98) Author : Patrick Martin Email : cimartin@flash.net Type of Mod ----------- Quake C : Yes (Type: Misc/Code Example) Sound : No MDL : No Format of QuakeC ---------------- unified diff : No context diff : No .qc files : Yes progs.dat : No Construction ---------------- Base : Modified ogre.qc. Build Time : ??? Editor(s) used : MS-DOS text editor and ProQCC v1.60. Hardware used : Pentium-100 with 16MB RAM and Quake v1.06. Known Bugs : None Impulses : N/A Description of the Modification ------------------------------- Below is a source code example of an alternative monster AI for lobbing grenades and other similar projectiles such as gibs. The following code will let ogres or zombies lob their projectiles at a standing target ANYWHERE within a radius of 1000 with frightening accuracy. Feel free to cut-and-paste this code into your projects. OGRE.QC (or ZOMBIE.QC) (All the changes will be made in the function void() OgreFireGrenade = or equivalent in other qc files. After the line local entity missile, mpuff; insert the following code...) //-------------------------------------------------------- New Code -------- local float dist; // Distance between attacker and target. local float base; // This dictates how fast the projectile // will fly up when it is launched. local float g; // Gravity -- g = 1 is Earth gravity. //------------------------------------------------------// // 800 is normal (Earth) gravity. 800 * 0.00125 = 1. // //------------------------------------------------------// g = (cvar("sv_gravity")) * 0.00125; // Find gravity in terms of g. //-------------------------------------------------------------------------- (Then, replace the following line missile.velocity_z = 200; with the code below...) //-------------------------------------------------------- New Code -------- dist = vlen(self.enemy.origin - self.origin); //--------------------------------------------------------------// // The monster will lob a projectile that is guaranteed to hit // // a stationary target within a radius of 1000. If the target // // is moving, it may aim the projectile a bit lower to counter // // any attempt to run underneath the grenade. // // //--------------------------------------------------------------// if (self.enemy.velocity_x || self.enemy.velocity_y) if (random() < 0.9) dist = dist - random()*300; if (dist > 900) base = 200+((dist - (200 - (dist * 0.2)))*0.5); else if (dist > 700) base = 200+((dist - (200 - (dist * 0.15)))*0.5); else if (dist > 500) base = 200+((dist - (200 - (dist * 0.1)))*0.5); else if (dist > 200) base = 200+((dist - 200)*0.5); else base = 200; missile.velocity_z = (missile.velocity_z + (base * g)); //---------------------------------------------------------------- END ----- Revision History ---------------- 4/20/97: version 1.1 * Aim AI now works on targets above or below lobbing monster. 3/24/97: version 1.0 * First release. Credits ------- * ID for creating Doom, Doom][, and Quake. * Rob Albin for QC106PAC.ZIP. * Lee Smith for PROQC160.ZIP. * Olivier Montanuy and Ferrara Francesco for the QuakeC manual. * Mom and Dad for plenty of good stuff. * God! Author Information ------------------ I am a 26 college graduate with one degree in mathematics and another degree in computer science. I currently live in Edmond, Oklahoma (which is in the United States). I am currently a member of The Coven. Webpage is at - http://www.planetquake.com/TheCoven/ I am also the author of the following Doom][ and Quake stuff: DOOM][ levels BLAKGATE DARKEDEN PM1523 Quake QC mods ARCHSHAM BOXFIX BREATH BUSTER CHARGE CHOKE CRANKED DKNIGHT DOOMSHOT DRAGONS GASBOMB LOB_AI NAPALM RESPAWN Quake2 DLL mods NAPALM2 Copyright and Distribution Permissions -------------------------------------- This is public domain. Disclaimer ---------- The author of this mod is NOT responsible for any damage caused by the use of this mod! If your computer malfunctions, you are on your own. To put it another way, use this mod at your own risk. Availability ------------ ftp.cdrom.com