### Combine Sound Hints using Bitwise OR in Lua Source: https://drvrej.com/project/vjbase/sound-hints This Lua code snippet shows how to combine multiple sound hints using the bitwise OR operation (`bit.bor`). This allows for more complex NPC reactions based on a combination of sound contexts. ```lua bit.bor(SOUND_DANGER, SOUND_CONTEXT_EXCLUDE_COMBINE) ``` -------------------------------- ### Emit Sound Hint in Lua Source: https://drvrej.com/project/vjbase/sound-hints This Lua code snippet demonstrates how to emit a sound hint using the `sound.EmitHint` function. It requires the `sound` library and takes a sound hint enumeration as an argument. ```lua sound.EmitHint( SOUND_DANGER ) ``` -------------------------------- ### ENT:CreateExtraDeathCorpse Source: https://drvrej.com/project/vjbase/npc/CreateExtraDeathCorpse Creates an extra corpse entity for an NPC upon death. This function provides extensive customization for the corpse's appearance, physics, and behavior. ```APIDOC ## ENT:CreateExtraDeathCorpse ### Description Creates an extra corpse entity when an NPC is killed. This function allows for detailed customization of the spawned corpse. ### Method N/A (This is a function call, not a direct HTTP endpoint) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body This function takes arguments directly, not a JSON request body. - **class** (string) - Required - The object class to use for the corpse (e.g., `prop_ragdoll`, `prop_physics`). - **models** (string | table) - Optional - Model(s) to use. If a table, a model will be picked randomly. Use `"None"` to not set a model. - **extraOptions** (table) - Optional - A table holding extra options to modify the corpse: - **Pos** (vector) - Sets the spawn position. - **Ang** (angle) - Sets the spawn angle. - **Vel** (vector | string) - Sets the velocity. Defaults to `"UseDamageForce"`. - **HasVel** (boolean) - If `false`, no velocity is set, allowing custom velocity in `customFunc`. Defaults to `true`. - **ShouldFade** (boolean) - Should the entity fade away after a certain time? Defaults to `false`. - **ShouldFadeTime** (number) - The time in seconds until the entity fades away. Defaults to `0`. - **RemoveOnCorpseDelete** (boolean) - Should the entity be removed if the main corpse is removed? Defaults to `true`. - **customFunc** (function) - Optional - A function that takes the created entity (`ent`) as a parameter, allowing for custom modifications. ### Request Example ```lua -- Example of calling the function local corpseModel = ENT:CreateExtraDeathCorpse("prop_ragdoll", {"models/props_junk/popcan01a.vmdl", "models/props_junk/popcan01b.vmdl"}, { Pos = Vector(0,0,10), Vel = Vector(100,0,0) }) ``` ### Response #### Success Response - **string** - The model path that was created. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.