I was just wondering how I can ignite a player with the left click of a swep.
Something like
[lua]
Ingite(Player)
[/lua] I would think.
ply:Ingite()
Alright, thanks you very much :)
[editline]07:42PM[/editline]
Would I change it to
[lua]
function SWEP:PrimaryAttack()
local trace = self.Owner:GetEyeTrace()
if trace.Entity:IsValid() then
if trace.Entity:IsNPC() then
trace.Entity:Ignite(45)
end
end
end
[/lua]
To Ingite an NPC?
Yes, It should work like that.
You could also set the distance for the fire to spread to another object.
[lua]
ent:Ignite(10,32) -- ignite for 10 seconds, and ignite other objects 32 units from you.
[/lua]
I'm trying to make a pistol that shoots a normal bullet, but when it hits something it ignites it.
[QUOTE='[TG]Chief(Alex);19086012']You could also set the distance for the fire to spread to another object.
[lua]
ent:Ignite(10,32) -- ignite for 10 seconds, and ignite other objects 32 units from you.
[/lua][/QUOTE]
It only spreads to breakable props.
Sorry, you need to Log In to post a reply to this thread.