Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Looping a sound on an entity?
tonitoni1998 Offline
Member

Posts: 163
Threads: 54
Joined: Oct 2012
Reputation: 1
#1
Looping a sound on an entity?

i tried this:
void OnEnter()
{
SoundPlay();
}

void SoundPlay()
{
void PlaySound2(string &in timer_name)
{
    SetEntityActive("sound_1", true);
    SetEntityActive("sound_2", false);
    AddTimer("", 2, "PlaySound3");
}

void PlaySound3(string &in timer_name)
{
    SetEntityActive("sound_2", true);
    SetEntityActive("sound_1", false);
    AddTimer("", 2, "PlaySound2");
}
}

but it doesn´t work :/ is there another way to loop a sound on an entity? or do you know why this doesnt work?

thanks ^^

When you are looking for someone, to do the scripting for your Custom Story, ask me!
02-26-2013, 08:05 PM
Find
OriginalUsername Offline
Posting Freak

Posts: 896
Threads: 42
Joined: Feb 2013
Reputation: 34
#2
RE: Looping a sound on an entity?

Seriously? Use playsoundatentity..

http://wiki.frictionalgames.com/hpl2/amn..._functions

Read that before asking those questions.
02-26-2013, 08:35 PM
Find
tonitoni1998 Offline
Member

Posts: 163
Threads: 54
Joined: Oct 2012
Reputation: 1
#3
RE: Looping a sound on an entity?

read my post before you complain. i want to loop a sound. PlaySoundAtEntity just plays it once. if there is a way to loop that, tell me.

When you are looking for someone, to do the scripting for your Custom Story, ask me!
02-27-2013, 05:14 PM
Find
OriginalUsername Offline
Posting Freak

Posts: 896
Threads: 42
Joined: Feb 2013
Reputation: 34
#4
RE: Looping a sound on an entity?

(02-27-2013, 05:14 PM)tonitoni1998 Wrote: read my post before you complain. i want to loop a sound. PlaySoundAtEntity just plays it once. if there is a way to loop that, tell me.

Open the .snt file in notepad++ or w/e program you use. Then change loop from false, to true.
02-27-2013, 05:17 PM
Find
tonitoni1998 Offline
Member

Posts: 163
Threads: 54
Joined: Oct 2012
Reputation: 1
#5
RE: Looping a sound on an entity?

i tried that in the first place, but it didnt work.

EDIT:

ah now i got what you mean. i first thought you mean the bool abSaveSound. now it works Tongue

thanks

When you are looking for someone, to do the scripting for your Custom Story, ask me!
(This post was last modified: 02-27-2013, 05:56 PM by tonitoni1998.)
02-27-2013, 05:51 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#6
RE: Looping a sound on an entity?

When you edit this file, it won't loop in other CSs unless you include it in the final release

Trying is the first step to success.
02-27-2013, 11:00 PM
Find




Users browsing this thread: 1 Guest(s)