Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Kyka

Scripted Ambient sounds refuse to work...

Recommended Posts

Script 4 (void) //Security Check
{
sethudsize(760, 580, 3);
SetFont("BIGFONT");
ACS_Execute(16, 0, 0, 0, 0);
Light_ChangeToValue(47, 255);
Light_ChangeToValue(48, 0);
HudMessage(s:"SECURITY CHECK"; HUDMSG_PLAIN, 0, CR_RED, 240.0, 175.0, 1.0);
delay(const:20);
HudMessage(s:" "; HUDMSG_PLAIN, 0, CR_RED, 240.0, 175.0, 1.0);
delay(const:20);
HudMessage(s:"SECURITY CHECK"; HUDMSG_PLAIN, 0, CR_RED, 240.0, 175.0, 1.0);
delay(const:20);
HudMessage(s:" "; HUDMSG_PLAIN, 0, CR_RED, 240.0, 175.0, 1.0);
delay(const:20);
HudMessage(s:"SECURITY CHECK"; HUDMSG_PLAIN, 0, CR_RED, 240.0, 175.0, 1.0);
delay(const:20);
HudMessage(s:" "; HUDMSG_PLAIN, 0, CR_RED, 240.0, 175.0, 1.0);
delay(const:250);
HudMessage(s:"clear"; HUDMSG_PLAIN, 0, CR_GREEN, 240.0, 250.0, 1.0);
delay(const:40);
}

Script 16 (void) //part 2 of the security check 2/3 way through level

{
AmbientSound("DSSWTCHX",127);
delay(const:40);
AmbientSound("DSITEMUP",127);
delay(const:40);
AmbientSound("DSITEMUP",127);
delay(const:40);
Floor_LowerToLowest (49, 16);
}

Forgive the noobishness of the code, but up until a few days ago, I had never written a line of code in my life, so by my very low coding standards, it is pretty leet haxor material. Anyway, the reason for the post, I can't see any reason why the ambient sounds refuse to play. Any thoughts?

Thanks. :)

Share this post


Link to post

Probably the most common mistake when first trying to get a script to play a sound. You have used the lump names of the sound, but you need to use the names defined in the SNDINFO lump instead.

As an example that I can remember, you would not use "DSTINK" but "misc/chat" instead.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×