Skip to content
SOURCE SEARCH REPOSITORY v2.16.0c

ENT:CreateExtraDeathCorpse

1 – string class ; 2 – string | table models = nil ; 3 – table extraOptions = nil ; 4 – function customFunc(ent) = nil
1 – string

Creates a extra corpse entity, use this function to create extra corpse entities when the NPC is killed.

Parameters

1 – string class

The object class to use, common types: prop_ragdoll, prop_physics.


2 – string | table models = nil

Model(s) to use, if it's a table then it will pick them randomly.

"None" = Doesn't set a model.


3 – table extraOptions = nil

Table that holds extra options to modify parts of the code.

vector Pos
Sets the spawn position.

angle Ang
Sets the spawn angle.

vector | string Vel = "UseDamageForce"
Sets the velocity.

boolean HasVel = true
If false then it won't set any velocity, allowing you to code your own in customFunc.

boolean ShouldFade = false
Should it fade away after certain time?

number ShouldFadeTime = 0
How much time until the entity fades away.

boolean RemoveOnCorpseDelete = true
Should the entity get removed if the corpse is removed?


4 – function customFunc(ent) = nil

Use this to edit the entity which is given as parameter ent.

Returns

1 – string

The model path that it created.