How to precache a sound automatically

Discuss programming in the QuakeC language.
Post Reply
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

How to precache a sound automatically

Post by Baker »

I want to setup a trigger to play a sound depending on the value of "playsound". It wants to play the sound, but it doesn't precache.

I thought I could do this but it doesn't work:

Code: Select all

void() trigger_once =
{
	if (self.playsound)
		precache_sound (self.playsound); // Add the sound to the precache
	self.wait = -1;
	trigger_multiple();
};
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: How to precache a sound automatically

Post by Baker »

Nevermind! QuakeC rusty.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Post Reply