trigger_multiple sound

Have questions about CoD4 mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Post Reply
Soviet
Core Staff
Core Staff
Posts: 7760
Joined: April 23rd, 2005, 9:12 pm
Location: Plano, Texas
Contact:

trigger_multiple sound

Post by Soviet » July 26th, 2008, 6:56 pm

Is there any way to make a trigger_multiple where while someone is touching a looping sound is playing (for them only), and when they aren't touching it it doesn't play?
Image
ImageImageImage
Image
"Zaitsev is a cunt." - Pedsdude

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: trigger_multiple sound

Post by Drofder2004 » July 26th, 2008, 9:18 pm

Just use playlocalsound and stoplocalsound.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Soviet
Core Staff
Core Staff
Posts: 7760
Joined: April 23rd, 2005, 9:12 pm
Location: Plano, Texas
Contact:

Re: trigger_multiple sound

Post by Soviet » July 26th, 2008, 9:53 pm

k, I'll try and figure out how to set it up.
Image
ImageImageImage
Image
"Zaitsev is a cunt." - Pedsdude

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: trigger_multiple sound

Post by Drofder2004 » July 27th, 2008, 1:20 pm

The things you will be looking to use are:

while(player isTouching(trigger))
{
//play sound
}
//stop sound
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Soviet
Core Staff
Core Staff
Posts: 7760
Joined: April 23rd, 2005, 9:12 pm
Location: Plano, Texas
Contact:

Re: trigger_multiple sound

Post by Soviet » July 27th, 2008, 8:53 pm

k, sorry for being such a noob, I just haven't scripted in over a year, and now I need it for stuff I'm working on.
Image
ImageImageImage
Image
"Zaitsev is a cunt." - Pedsdude

Pedsdude
Site Admin
Site Admin
Posts: 15909
Joined: October 15th, 2004, 7:18 pm
Location: UK

Re: trigger_multiple sound

Post by Pedsdude » July 27th, 2008, 10:06 pm

What map's this for?
Image
Image

Soviet
Core Staff
Core Staff
Posts: 7760
Joined: April 23rd, 2005, 9:12 pm
Location: Plano, Texas
Contact:

Re: trigger_multiple sound

Post by Soviet » July 27th, 2008, 10:14 pm

none of your business :P
Image
ImageImageImage
Image
"Zaitsev is a cunt." - Pedsdude

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 0 guests