• My igniting weapon doesn't ignite all NPC's.
    2 replies, posted
[lua] function SWEP:PrimaryAttack() local trace = self.Owner:GetEyeTrace() if trace.Entity:IsValid() then if trace.Entity:IsNPC() or trace.Entity:IsPlayer() then trace.Entity:Ignite(10) end end end [/lua] Does anyone know what to tweak so it ignites all NPC's? It's only igniting zombies and combine soldiers + metrocops.
if trace.Entity:IsNPC() or trace.Entity:IsPlayer() or trace.Entity:GetClass() == "npc_combine" or whatever...
[QUOTE=Chad Mobile;20233279][lua] function SWEP:PrimaryAttack() local trace = self.Owner:GetEyeTrace() if trace.Entity:IsValid() then if trace.Entity:IsNPC() or trace.Entity:IsPlayer() then trace.Entity:Ignite(10) end end end [/lua] Does anyone know what to tweak so it ignites all NPC's? It's only igniting zombies and combine soldiers + metrocops.[/QUOTE] Some things don't ignite, such as a hunter.
Sorry, you need to Log In to post a reply to this thread.