play 3d sound at position instead of from entity?

Posted By: Denn15

play 3d sound at position instead of from entity? - 07/22/15 10:02

is it possible to play a 3d sound at a given position (x, y, z) instead of from an entity?
i want to have a sound playing from an enemy when the enemy is killed, but the thing is that as soon as the enemy is removed with ent_remove, then the sound stops.

is there a workaround to this, that does not involve using entities?
Posted By: txesmi

Re: play 3d sound at position instead of from entity? - 07/22/15 10:47

Hi,
you can wait to the music finish after deleting the entity. You might set PASSABLE | INVISIBLE to the enemy to take it off from the scene, if you want.

Salud!
Posted By: Ch40zzC0d3r

Re: play 3d sound at position instead of from entity? - 07/22/15 11:23

Create a dummy entity with the string "" or NULL and then use snd_playing (handle); to check when the sound has ended. You can remove the entity now.
© 2024 lite-C Forums