All pastes #735772 Raw Edit

CapsAdmin

public lua v1 · immutable
·published 2007-10-13 22:55 UTC
rendered paste body
	function Breakable.CreateEntitySmokeTrail(Entity)		if not (Entity.Breakable.Smoke) then			local Low, High = Entity:WorldSpaceAABB()			local Center = High - (( High - Low ) * 0.5)			local vPos = Vector( math.Rand(Low.x,High.x), math.Rand(Low.y,High.y), math.Rand(Low.z,High.z) )			local effectdata = EffectData()			effectdata:SetOrigin(vPos)			effectdata:SetStart(vPos)			effectdata:SetScale( 10 )			effectdata:SetRadius( 100 )			util.Effect( "breakable_smoke", effectdata )			end	end		-- Entity take damage		function TOOL.EntityTakeDamage(Entity, One, Two, Damage)		Breakable.DamagePhysicsEntity(Entity, Damage)	end		hook.Add("EntityTakeDamage", "TOOL.EntityTakeDamage", TOOL.EntityTakeDamage)end