ENTITY:Ignite() does not credit damage correctly (or at all!)

ENTITY:Ignite(dura,rad) does not credit damage correctly (or at all!)
Would like to modify the ignite function to include a ENT:Ignite(dura,rad,PLAYER), but doing something like this is a bit too hacky and unreliable for my purposes:


local meta = FindMetaTable(“Entity”)

meta.TrueIgnite = meta.Ignite

function meta:Ignite( dura,rad,ply )
self:TrueIgnite( dmg,dura )
if( IsValid( ply ) && ply:IsPlayer() ) then
self.IgnitedBy = ply
self.IgniteTime = CurTime()+dura

meta.TrueExtinguish = meta.Extinguish
function meta:Extinguish()
self.IgnitedBy = false
self.IgniteTime = 0

hook.Add(“EntityTakeDamage”,“FixIgniteDamageCrediting”, function( ply,dmginfo )
if( dmginfo:IsDamageType( DMGTYPE_IGNITE ) && IsValid( ply.IgnitedBy ) && (ply.IgniteTime or 0) > CurTime() ) then
Attacker = ply.IgnitedBy

// Do other damage calculations

end )


  • This code is untested and probably won’t work first go, but you get where i’m going with it.

After doing some searching around on the gmod wiki, i found nothing.
Searched facepunch forums, found nothing.
i’ve also used a program to search through every lua file in gmod just to check if it was in sandbox or base or something, and nope not there either.

From what i can tell ENTITY:Ignite() is a C-function and won’t be visible in lua.

My question to you is thusly; does anyone have a pre-written ignite script (in lua) so i can modify it to the needs of my gamemode?
Just saves having to write one from scratch is all, tracking down the required particle effects etc.

try ignite them but make them ignore DMG_BURN, then make a hook to steadily deal generic damage to them and credit it properly