Hi, I am quite new to editing lua's, and recently I have been editing a script out of a tutorial.
I want to know how to get the primary fire to be a fusion explosion, like with the fusion-bomb gun.
(I just want the effect, I think I have the sound and I like the damage etc. as it is)
Here is the contents 'Shared.lua' file:
Code:
SWEP.Author = "BlackholeST"
SWEP.Contact = "I am not saying : )"
SWEP.Purpose = "Have fun and KILL PEPOLE!!!"
SWEP.Instructions = "Primary to BLOW STUFF UP! Secondary to BLAST STUFF WITH BULLETS!"
SWEP.Category = "Superpower fists"
SWEP.Spawnable = true;
SWEP.AdminSpawnable = true;
SWEP.ViewModel = "models/weapons/v_hands.mdl";
SWEP.WorldModel = "models/weapons/w_hands.mdl";
SWEP.Primary.Sound = Sound( "ambient/explosions/explode_2.wav" )
SWEP.Primary.ClipSize = -1;
SWEP.Primary.DefaultClip = -1;
SWEP.Primary.Automatic = true;
SWEP.Primary.Ammo = "none";
SWEP.Secondary.Sound = Sound( "ambient/explosions/explode_2.wav" )
SWEP.Secondary.ClipSize = -1;
SWEP.Secondary.DefaultClip = -1;
SWEP.Secondary.Automatic = false;
SWEP.Secondary.Ammo = "none";
SWEP.Sound = Sound ("ambient/explosions/explode_2.wav")
SWEP.Damage = 5000
SWEP.Spread = 5000
SWEP.NumBul = 1
SWEP.Delay = 0.7
SWEP.Force = 5000
function SWEP:Deploy()
return true
end
function SWEP:Holster()
return true
end
function SWEP:Think()
end
//KILL PEOPLE
function SWEP:PrimaryAttack()
local eyetrace = self.Owner:GetEyeTrace();
self.Weapon:EmitSound ( self.Sound )
self.BaseClass.ShootEffects (self);
local explode = ents.Create( "env_explosion" )
explode:SetPos( eyetrace.HitPos )
explode:SetOwner( self.Owner )
explode:Spawn()
explode:SetKeyValue( "iMagnitude", "5000" )
explode:Fire( "Explode", 0, 0 )
explode:EmitSound( "weapon_AWP.Single", 5000, 5000 )
self.Weapon:SetNextPrimaryFire( CurTime() + self.Delay )
self:TakePrimaryAmmo(0)
end
function SWEP:Reload()
self.Weapon:DefaultReload( ACT_VM_RELOAD )
end
Bookmarks