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
sounds
G510s Offline
Banned

Posts: 58
Threads: 32
Joined: Jun 2014
#1
sounds

i need help with the sound effects...idk how to get the to play when i want...i use the sound category in the hpl editor but when i spawn into a level it plays right away instead of when i want it to.
07-12-2014, 11:49 AM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#2
RE: sounds

This might come in handy.

void PlaySoundAtEntity(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound);

Creates a sound on an entity.

asSoundName - internal name
asSoundFile - the sound to use + extension .snt
asEntity - the entity to create the sound at, can be “Player”
afFadeTime - time in seconds the sound needs to fade. Avoids enemies hearing the sound if afFadeTime is at least 0.1f
abSaveSound - if true, a looping sound will “remember” its playback state (currently playing/stopped), and that state will be restored the next time the level is entered. If true, the sound is never attached to the entity! Note that saving should only be used on looping sounds!

Derp.
07-12-2014, 12:21 PM
Find
Artsy Offline
Member

Posts: 213
Threads: 10
Joined: Feb 2014
Reputation: 9
#3
RE: sounds

The sounds from the Level Editor are not made to play whenever you want them to, they're loops and they're mostly designed to work for level ambiance and such. What Neelke said, use that function.

For other sounds/music related functions, see this:
https://wiki.frictionalgames.com/doku.ph...unds_music
07-12-2014, 01:21 PM
Find




Users browsing this thread: 1 Guest(s)