AmbientStop doesnt work

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

Moderator: Core Staff

Post Reply
User avatar
waywaaaard
Core Staff
Core Staff
Posts: 2214
Joined: February 6th, 2006, 3:18 pm
Location: Germany/Bayern

AmbientStop doesnt work

Post by waywaaaard » May 24th, 2007, 3:55 pm

hi i wanna stop the ambientsound and start it again after playing another sound

Code: Select all

haloroom()
{
speakerhalo =  getent ("speaker_halo", "targetname");
halotrig = getent ("halo_trigger", "targetname");
while(1)
{
halotrig waittill ("trigger");
AmbientStop(2);
speakerhalo playsound("lev_facilities_sound7");
wait(117);
AmbientPlay("ambient_mp_lev_facilities");
}
}
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Post by Nightmare » May 24th, 2007, 8:18 pm

I am pretty sure that you cannot stop ambient, it is something that loops in the background non-stop.
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

User avatar
waywaaaard
Core Staff
Core Staff
Posts: 2214
Joined: February 6th, 2006, 3:18 pm
Location: Germany/Bayern

Post by waywaaaard » May 24th, 2007, 10:24 pm

but why exists then such a function?
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

Luke
Past/Inactive Team Member
Past/Inactive Team Member
Posts: 1774
Joined: May 31st, 2005, 12:42 am
Location: Cornwall, UK

Post by Luke » May 24th, 2007, 11:19 pm

I couldn't get it to work either, so either were doing it wrong or it could be an SP function only.

As a simple workaround you could create another alias in your csv with a vol_min of 0, and use ambientplay on that to stop it.
Watch this before posting a question: http://www.albinoblacksheep.com/flash/posting.php

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

Post by Soviet » May 25th, 2007, 6:56 am

maybe you need to incorporate the ambient music as a script that has a starting state of on which turns off when the trigger is activated. Similar to on-off death triggers or situational triggers.
Image
ImageImageImage
Image
"Zaitsev is a cunt." - Pedsdude

User avatar
waywaaaard
Core Staff
Core Staff
Posts: 2214
Joined: February 6th, 2006, 3:18 pm
Location: Germany/Bayern

Post by waywaaaard » May 25th, 2007, 8:45 am

i will try to work it out with the vol_min 0
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Post by Nightmare » May 25th, 2007, 8:56 pm

soviet, even if it was in a script it would keep on playing until it ended. Your best shot would be with what luke said, try the vol_min 0
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

Post Reply

Who is online

Users browsing this forum: No registered users and 37 guests