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


Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help with sound
Juby Away
Senior Member

Posts: 290
Threads: 2
Joined: May 2011
Reputation: 5
#8
RE: help with sound

(07-17-2012, 07:57 PM)zecuro Wrote:
(07-17-2012, 07:48 PM)JMFStorm Wrote: Look for Sounds & Music section here.

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

yep pretty awesome thanks but i'm new to scripting and all so do you have advice on how to start
PlayGuiSound("sound.ogg", 1);
PlaySoundAtEntity("soundname", "sound.snt", "Player", 0, false);
PlayMusic("music.ogg", true, 1, 0, 1, false);


GuiSound - typically uses .ogg sound files and is not a 3D sound

SoundAtEntity - only uses a .snt sound file, meaning this is a 3D sound that can be played on any particular entity, fading at a certain distance. SoundName can be used later in the command StopSound("name", 0);

Music - uses .ogg sound files, the second parameter (true) allows it the loop, change to false if you do not want it to loop. The last "1" there determines priority; I would use 0 for background music. This is used in the actual game many times when you use music in an event and then it cuts into the background music again. The music in the event should be priority 1, allowing the music to play over the background, then cut back.

Insanity. Static.
07-18-2012, 12:44 PM
Find


Messages In This Thread
help with sound - by zecuro - 07-17-2012, 07:32 PM
RE: help with sound - by Statyk - 07-17-2012, 07:32 PM
RE: help with sound - by zecuro - 07-17-2012, 07:46 PM
RE: help with sound - by JMFStorm - 07-17-2012, 07:37 PM
RE: help with sound - by JMFStorm - 07-17-2012, 07:48 PM
RE: help with sound - by zecuro - 07-17-2012, 07:57 PM
RE: help with sound - by JMFStorm - 07-18-2012, 08:40 AM
RE: help with sound - by Juby - 07-18-2012, 12:44 PM



Users browsing this thread: 2 Guest(s)