So uh, using the ENT:Touch function to add something to another entity and the effect from that is to spit out another entity. It works... kinda. The only problem is how ever many points of contant there are between the two entites is how many times it spawns the other entity.
[CODE]function ENT:Touch( ent )
if ent:GetClass() == "meth_stove" then
self:Remove()
net.Start( "FertilizerAdded" ) net.Broadcast()
timer.Simple( 5, function()
local coke = ents.Create("durgz_cocaine")
coke:SetPos( ent:GetPos() )
coke:Spawn()
net.Start( "CokeFinished" ) net.Broadcast()
end )
end
end
[/CODE]
Does anyone know how I could get around this?
Use StartTouch instead of Touch
Thank you
Sorry, you need to Log In to post a reply to this thread.