Inside3D tutorials.
Created By: | Pob the Impaler |
A.W.Johnstone@btinternet.com | |
Difficulty Scale | Easy |
Right first of we will give the player and bots all the stuff to start with. We'll do the player first so open up client.qc. Find the function PutClientInServer. search for void () PutClientInServer = { Above the line: void () PutClientInServer = { We are going to add another function called Dm4Start. So (Make sure you are above the PutClientInServer line) add: //====Start Code=======// void () Dm4Start = { // For DM 4 rules start with all guns, full health,armor, and ammo, and all guns self.health = 200; self.armorvalue = 250; self.armortype = 0.800; self.ammo_rockets = MUST_HAVE; self.ammo_nails = 200.000; self.ammo_shells = MUST_HAVE; self.items = self.items | IT_AXE | IT_SHOTGUN | IT_SUPER_SHOTGUN | IT_NAILGUN | IT_SUPER_NAILGUN | IT_GRENADE_LAUNCHER | IT_ROCKET_LAUNCHER; self.ammo_cells = 200.000; self.items = (self.items | IT_LIGHTNING); self.weapon = IT_LIGHTNING; self.impulse = FALSE; W_SetCurrentAmmo (); }; //====End Code=========// Now we need to call this function when the player is put in the game, So.. Go to PutClientInServer (Under the function you just added.) Find the line: spot = SelectSpawnPoint (); ABOVE this line add: //====Start Code=======// if (deathmatch == 4) { Dm4Start(); } //====End Code=========// Save and close client.qc We now need to give the bots all this stuff when they spawn. So open botspawn.qc. At the very top of botspawn.qc add: //====Start Code=======// void () Dm4Start; //====End Code=========// Find the function PutBotInServer. search for void () PutBotInServer = { Find the line: spwn = SelectSpawnPoint (); Above this line add: //====Start Code=======// if (deathmatch == 4) { Dm4Start(); } //====End Code=========// Save and close botspawn.qc
Now we want to put 10 health and stuff in the backpacks. Open up items.qc Find BackpackTouch. search for void () BackpackTouch = { find the line: other.ammo_shells = (other.ammo_shells + self.ammo_shells); above this line add: //====Start Code=======// if (deathmatch = 4) { other.health = (other.health + 10); // if dm4 give + 10 if (other.health >= 300) { other.health = 100; other.super_time = 1; other.super_damage_finished = 1 + SVC_INTERMISSION; other.items = other.items | IT_QUAD; other.invincible_time = 1; other.invincible_finished = 1 + SVC_INTERMISSION; other.items = other.items | IT_INVULNERABILITY; } } //====End Code=========// Save and close items.qc
Step 3
Now we want to slow down the fire rate of the grenade launcher (I think this is a stupid rule, but hey! I didn't make them up :) Open weapons.qc Find the function W_Attack. search for void () W_Attack = { Find the line: W_FireGrenade (); delete the line underneath, which reads: self.attack_finished = (time + 0.600); Now, under the W_FireGrenade (); add: //====Start Code=======// if (deathmatch = 4) { self.attack_finished = (time + 1.200); } else { self.attack_finished = (time + 0.600); } //====End Code=========// That means the grenade launcher will take twice as long to fire than normal :( To be honest you can't see much of a difference. save and close weapons.qc; //---End Code---//
Step 4
Now what we have to do is make the Quad Damage an Octa Damage. Excuse me while I figure out how to do it..... Erm.... Umm.... Ehm.... Bloody hell.... Erm..... Ah Ha!... no :( We'll come back to this one I think. Right, got it know, ThanX James Abbatiello! Open up combat.qc Find the function T_Damage Find the lines which read: if ( (attacker.super_damage_finished > time) ) { damage = (damage * MOVETYPE_STEP); } Change these lines to read: //====begin code====// if ( (attacker.super_damage_finished > time) ) { if (deathmatch == 4) { damage = (damage * 8); } else { damage = (damage * MOVETYPE_STEP); // MOVETYPE_STEP == 4 } } //====end code=====//
Step 5
Apparently we don't want weapons on the level so... Open items.qc again Find the function weapon_supershotgun. search for void () weapon_supershotgun = { Now add the following lines to the top of the function: //==add code==// if (deathmatch == 4) { remove(self); return; } //==add code==// Now do EXACTLY the same again for the following function: void () weapon_nailgun = { void () weapon_supernailgun = { void () weapon_grenadelauncher = { void () weapon_rocketlauncher = { void () weapon_lightning = { also if you have done the plasma gun RIP do this function as well: void () weapon_plasma = {There ya go! Start your game, type "deathmatch 4" at the console then "restart" I think these rules are crap, but hey, I'm just a mere mortal! :) It seems to be far too hard to stay alive long enough to get 300 health! Anyway... See 'ya next time for more red-hot bot-on-bot action! :)