How to multiply an entity/prop on kill/destry

Hey!

I’m wondering if any of you pro coders knows how to make an entity or prop recently destroyed to multiply into 2 peices.

Make a sent. THen hook on the damaga hook. Once you had enough. SPawn 2 more Entities etc?

Do I smell a copy of the melons/oranges?

Or maybe something original that simply has a replication ability. The melon and orange entities weren’t the first and definitely aren’t the last things to replicate.

Here’s the hook you may want, Gamemode.PropBreak
[lua]hook.Add(“PropBreak”,“PropHydra”,function(breaker, prop)
– make the new props here
end)[/lua]

Entity:CallOnRemove()

:golfclap:

Thanks guyz, sorry i could’t respond earilier… obv i was banned for some unknown reason.

BRB throwing a self-replicating entity into a trigger_remove

I’d say the idea with having a SENT with health that gets subtracted whenever damage is applied to it is the best idea in this case.

That way, instead of on every removal, when the prop breaks, the original prop can be removed and two new ones spawned in its place. That won’t stop natural removal things such as the trigger_remove, remover toolgun or Lua’s entity:Remove() from accidentilly triggering the split.

Yeah but where’s the fun in that?