Jump to content

how to make a script play a sound?


Agnot2006

Recommended Posts

I posted a request for information on how to make a script play a sound. I received a reply (Thank You Cipscis ) that said use playsound or Playsound3D.

This works using the script:

scn MySoundTriggerSB

 

begin OnTriggerEnter

Playsound aaaMySoundSB

end

But it only plays the sound once on entering.

What I need is a way to make the sound repeat until you exit. With a random delay would be great.

I tried:

begin OnTriggerEnter

aaaMySoundSB.enable

end

 

begin OnTriggerLeave

aaaMySoundSB.disable

end

 

But this doesn’t work can anyone help?

Link to comment
Share on other sites

yes at the moment the sound which is a copy from the game with a new ID just plays and is set to random. If I remove it and use the script and trigger box it plays once on entering. To play again you have to moveaway and re-enter.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...