sound help <3
Moderator: Core Staff
sound help <3
right basically i have my sound working .... its in the start room you spawn and it plays .. but 2 of the same song play one plays a spilt second after the last :L:L sounds horrible ... and also if i knife the ground the song will start playing were i knife :L:L:L ................... soo annoying theres like 40 of the same song playing all over the map xD
-
- Core Staff
- Posts: 2214
- Joined: February 6th, 2006, 3:18 pm
- Location: Germany/Bayern
Re: sound help <3
Post your gsc that starts the sound please
THAT HANDS WERE NOT TRACED!
visit my blog: Link
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality
Re: sound help <3
maybe ostmob can help u
-
- CJ Wannabe
- Posts: 27
- Joined: April 8th, 2012, 5:04 pm
Re: sound help <3
Code: Select all
trigger_init()
{
    soundtriggers = getentarray( "sound_trigger", "targetname" );
Â
    for( i = 0; i < soundtriggers.size; i++ )
        soundtriggers[i] thread trigger_sound();
}
Â
trigger_sound()
{
    soundpos = getent( self.target, "targetname" );
Â
    for(;;)
    {
        self waittill( "trigger", user );
Â
        if(!isDefined(user.sound) || user.sound != soundpos.script_noteworthy)
        {
            if(isDefined(user.sound))
                user stoplocalsound(user.sound);
Â
            user.sound = soundpos.script_noteworthy;
            user thread play_the_sound(soundpos.script_noteworthy);
            user thread waitForLeave(self, soundpos.script_noteworthy);
        }
        wait 0.25;
    }
}
Â
play_the_sound( sound )
{
    self endon("disconnect");
    self notify("music_change");
    self endon("music_change");
Â
    self playlocalsound( sound );
    wait 500;
    self.sound = undefined;
}
killSuspenseMusic()
{
    wait 1;
Â
    if(isDefined(game) && isDefined(game["music"]) && isDefined(game["music"]["suspense"]))
        for(i = 0;i < game["music"]["suspense"].size;i++)
            game["music"]["suspense"][i] = "null";
}
Â
waitForLeave(trigger, sound)
{
    if(!isSubStr(sound, "8") && !isSubStr(sound, "7") && !isSubStr(sound, "10"))
        return;
Â
    self endon("disconnect");
    while(self isTouching(trigger))
        wait 0.5;
    self stopLocalSound(sound);
    self.sound = undefined;;
}
Re: sound help <3
so sound 7 8 and 10 are the sound lines in your soundaliases sequence if i am not mistaking!?
i have that same script you gave me, but mine problem is that the sound does not stop playing
when i leave the trigger!
i also tried to make a looping sound and no success!
when it is on nonlooping it works, but when i set it to looping there is no sound! why is that?
i have that same script you gave me, but mine problem is that the sound does not stop playing
when i leave the trigger!
i also tried to make a looping sound and no success!
when it is on nonlooping it works, but when i set it to looping there is no sound! why is that?
Re: sound help <3
i have fixed the trigger problem!
my soundaliases sequence number was 1 so i placed 1 instead of 8 and now
when i exit trigger music stops, so that works fine!
but i still cant set looping, please help me with that!
i need looping because when i save position in music room and go outside,
then reload back inside the music does not start again! it starts only if i enter
trough a teleport!
my soundaliases sequence number was 1 so i placed 1 instead of 8 and now
when i exit trigger music stops, so that works fine!
but i still cant set looping, please help me with that!
i need looping because when i save position in music room and go outside,
then reload back inside the music does not start again! it starts only if i enter
trough a teleport!
Who is online
Users browsing this forum: No registered users and 33 guests