All pastes #735277 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-10-13 13:54 UTC
rendered paste body
	function Breakable.DamagePhysicsEntity(Entity, Amount)
		local smoke = Entity.Breakable.Smoke
		if smoke and smoke:IsValid() then
			local COLHP = 2.55*(Entity.Breakable.Cur / Entity.Breakable.Max *100) -- 255 to 0 based on HP
			smoke:Fire("addoutput","startcolor".." "..tostring(COLHP).." "..tostring(COLHP).." "..tostring(COLHP))
			smoke:Fire("addoutput","endcolor".." "..tostring(COLHP).." "..tostring(COLHP).." "..tostring(COLHP))
		end