I was looking through the ignite code for ULX in an effort to remove the damage from ignite so all that would be left are the fire particles following you around, but all I found was that it referenced entitiy:Ignite which I cannot find the code for. Can anyone help me out with just getting the particles? Thanks.
I don't know if the game treats it as the inflictor or the attacker, but the thing that actually does the damage to an ignited entity is "entityflame".
So, if it was the attacker, you could do:
[code]local function PlayerShouldTakeDamage( pl, attacker )
if <SomeCondition> and IsValid( attacker ) and attacker:GetClass( ) == "entityflame" then
return false
end
end
hook.Add( "PlayerShouldTakeDamage", "Block Ignite Damage", PlayerShouldTakeDamage )[/code]
If it isn't the attacker, or you also want to do this to props and npcs, then you would need to use a different hook - EntityTakeDamage
[code]local function EntityTakeDamage( ent, info )
local e = info:GetInflictor( ) --Or GetAttacker
if <SomeCondition> and IsValid( e ) and e:GetClass( ) == "entityflame" then
info:SetDamageType( DMG_GENERIC )
info:SetDamage( 0 )
end
end
hook.Add( "EntityTakeDamage", "Block Ignite Damage", EntityTakeDamage )[/code]
You may or may not need to change the damage type to stop the sound that being on fire gives players.
Hopefully this helps.
Sorry, you need to Log In to post a reply to this thread.