Discord
Steam
/
Garry's Mod
/
Developers
/
A few entity q..
Login/Join
Event Log
A few entity questions.
0 replies, posted
Search
In This Thread
[lua]function SWEP:PrimaryAttack() self.Weapon:SetNextPrimaryFire( CurTime() + 0.07 ) self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK ) self:EmitSound( ShootSound ) self:ShootEffects( self ) if (!SERVER) then return end self:TakePrimaryAmmo( 0 ) local x for x = 1, 1 do local r1 = math.random(-100, 100) / 10000 local r2 = math.random(-100, 100) / 10000 local r3 = math.random(-100, 100) / 10000 local Forward = self.Owner:EyeAngles():Forward() local ent = ents.Create( "hunter_flechette" ) if ( ValidEntity( ent ) ) then ent:SetPos( self.Owner:GetShootPos() + Forward * 32 ) ent:SetAngles( self.Owner:EyeAngles() ) ent:Spawn() ent:SetVelocity( Forward * 5000 ) end ent:Fire("addoutput","basevelocity 0 0 -30",0.1) ent:Fire("addoutput","basevelocity 0 0 -30",0.3) ent:Fire("addoutput","basevelocity 0 0 -30",0.5) ent:Fire("addoutput","basevelocity 0 0 -30",0.7) ent:Fire("addoutput","basevelocity 0 0 -30",1) ent:Fire("addoutput","basevelocity 0 0 -30",1.3) ent:Fire("addoutput","basevelocity 0 0 -30",1.5) ent:Fire("addoutput","basevelocity 0 0 -30",1.7) ent:Fire("addoutput","basevelocity 0 0 -30",2) ent:Fire("addoutput","basevelocity 0 0 -30",2.3) ent:Fire("addoutput","basevelocity 0 0 -30",2.5) ent:Fire("addoutput","basevelocity 0 0 -30",2.7) ent:Fire("addoutput","basevelocity 0 0 -30",3) ent:Fire("addoutput","basevelocity 0 0 -30",3.3) ent:Fire("addoutput","basevelocity 0 0 -30",3.5) ent:Fire("addoutput","basevelocity 0 0 -30",3.7) ent:Fire("addoutput","basevelocity 0 0 -30",4) ent:Fire("addoutput","basevelocity 0 0 -25",3.7) ent:Fire("addoutput","basevelocity 0 0 -50",4) ent:AddEffects( EF_ITEM_BLINK | EF_BRIGHTLIGHT ); ent:SetOwner( self.Owner ) util.ScreenShake( ent:GetPos(), 4, 3, 0.9, 120 ) ParticleEffectAttach("larvae_glow_extract",PATTACH_ABSORIGIN_FOLLOW,ent,0) timer.Simple(2.7,function() ParticleEffectAttach("striderbuster_explode_dummy_core","Weapon_Combine_Ion_Cannon_Explosion",PATTACH_ABSORIGIN_FOLLOW,ent,ply,0) end) end end [/lua] So how would I make the flechettes not fire in a completely straight line and what is the effect when the combine balls explode (the huge explosion)?
Sorry, you need to
Log In
to post a reply to this thread.