Forum

How to precache a sound automatically

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

How to precache a sound automatically

Postby Baker » Mon Jul 14, 2014 6:53 am

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 ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: How to precache a sound automatically

Postby Baker » Mon Jul 14, 2014 10:56 am

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 ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest