func_breakables

How can I break a func_breakable in lua?


ent:Fire( "Break", "", 0 )

**[func_breakable

http://developer.valvesoftware.com/favicon.ico](http://developer.valvesoftware.com/wiki/Func_breakable)**

Dev wiki is your friend for entity information.

Good. I have another question:

Can I set the delay of respawn of Breakables? Or it is set by the map?

You could do something like this:

[lua]local SPAWN_TIME = 5
hook.Add(“InitPostEntity”,“SpawnBreakables”,function()
for _,v in ipairs(ents.FindByClass(“func_breakable”)) do
v:SetNoDraw(true)
v:SetSolid(SOLID_NONE)
timer.Simple( SPAWN_TIME, function()
v:SetNoDraw(false)
v:SetSolid(SOLID_VPHYSICS)
end)
ed
end)[/lua]

That doesn’t spawn anything? Are func_breakable’s not removed on break?

Oh, respawn. That was my bad.

Yup, that’s why I wonder that.