How do I make an entity gib?

I have this SENT that is programmed to disappear by way of ent:Remove(), but this causes it to disappear completely without warning. The prop is a melon, so it is capable of gibbing, how do I make it gib?

Inside your Initialize function, make sure to call PrecacheGibs( ).

Then, you can simply do:


self:GibBreakClient( force )

or


self:GibBreakServer( force )

Where force is direction times applied force.

GibBreakClient
GibBreakServer

Thanks! And do they eventually disappear, or is there a way to make them do so?

There are two convars:

prop_active_gib_limit
prop_active_gib_max_fade_time

Those are server convars so I don’t know if GibBreakClient is affected by changes to them.

If you want control independent from the convars, you are going to have to do it yourself rather than use a built-in method.

Alright, I appreciate it!