Problem with Sound Loop [Solved]

Started by Lionheart, Thu 16/06/2005 15:02:48

Previous topic - Next topic

Lionheart

Ok this is the way i have the intro set up.

I have a room made for the title displaying the team message, then in order to get past that you have to click it (Hotspot is the whole screen) then if you click it you go to the main title screen.

But on the team message i have a sound effect of a lions roar and it lasts for about 6 seconds, but it constantly loops, how can i stop that looping and only have the sound effect play once?

Thanks.

strazer

How do you play the sound?
Sounds played with the PlaySound/Ex functions or the "Game - Play sound effect" interaction command shouldn't loop.

Lionheart

I think i do Play Music under interaction editor and in first time player enters screen and then chose 2 because the file name is MUSIC2

The File is an MP3 File,

so how do i make it so it just plays it once, or change it to a sound..?

strazer

#3
Music loops by default.
Since you want to play a sound effect (they are played once), use the "Game - Play sound effect" interaction command or the PlaySound/Ex function in script.

Edit:

And yeah, the file has to be named SOUNDx instead of MUSICx.

Lionheart

Ok it works.

The Problem i had was the file in my folder was named MUSIC2 instead of SOUND2 so when i did play sound nothing happened.. so i just changed that.

Thanks again straz.

manny.p

Hi m8, i'm basically following your threads cause i'm doing the same thing as you.

I had the exact same problem, but here's the code i did that made it work with music.

Use SetMusicRepeat(0); to stop music repeating.

And the rest is my intro like you've been working on.

function room_a() {
// script for Room: First time player enters screen
SetMusicRepeat(0);
Wait(40);
//
SetFadeColor(255, 255, 255);
FadeIn(1);
object[0].Visible = true;
PlayMusic(1);
Wait(280);
FadeOut(1);
//
object[0].Visible = false;
Wait(40);
//
FadeIn(1);
object[1].Visible = true;
PlayMusic(2);
Wait(540);
FadeOut(1);
//
object[1].Visible = false;
//
Wait(40);
FadeIn(1);
//
player.ChangeRoom(1);

SMF spam blocked by CleanTalk