Inside3D tutorials.
Created By: | Timm 'Mr?' Stokke |
eMail: | hestokke@online.no |
Difficulty Scale: | Easy |
else if (self.weapon == IT_SHOTGUN) { player_shot1 (); W_FireShotgun (); self.attack_finished = time + 0.15; //Changed from 0.5; }And that's all you have to do if you don't want to add the "rambo" stuff. (ie. Get more shells when you shoot) If you DO want to play Rambo, though, please follow the 2 next steps.
/* ================ W_FireShotgun ================ */ void() W_FireShotgun = { local vector dir; sound (self, CHAN_WEAPON, "weapons/guncock.wav", 1, ATTN_NORM); self.punchangle_x = -2; self.currentammo = self.ammo_shells = self.ammo_shells +1; //Changed from -1; Set to "0" if you don't want any shells dir = aim (self, 100000); FireBullets (6, dir, '0.01 0.01 0'); //changed from '0.04 0.04 0' . Makes more of a MachineGun effect };