Frictional Games Forum (read-only)

Full Version: How do I make music that overrides enemy music?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Title.

I want to spawn to toggle an enemy, and then have music play instead of his. After the music's done, the enemy's danger/attack music can be played normally again.

How do I do this? (I already know how to play music and toggle enemies, I also tried setting the music priority to highest (0) and it didn't work. The tracks just play simultaneously.)
You need to make a custom entity without music files attached to its states. It has three states which play different music files: danger, search, and attack. Open up the enemy in the model editor and under user-defined variables, delete the fields for each music option. Then save it as a separate entity and use it. Good luck.
Of course, if you want other music to play in place of the monster music, you can just place the sound files you'd rather have in the relevant boxes instead of clearing them entirely.
I might have some amnesia, but 0 is lowest. Try a higher value, can't recall what enemies might have but test 100 or something. Otherwise do as suggested by palistov/photoneus above and make a custom entity file.
(08-22-2011, 09:15 AM)jens Wrote: [ -> ]I might have some amnesia, but 0 is lowest. Try a higher value, can't recall what enemies might have but test 100 or something. Otherwise do as suggested by palistov/photoneus above and make a custom entity file.

Its weird. In my amnesia it works as 0 lowest, 1 higher. I posted that into wiki thread and it seams yet again to many other it works opposite, that 0 is higher then 1 :/
I think the confusion is because sounds work the opposite.

Sounds with a higher value will be canceled earlier as sound channels run out, so for example monster sounds you want to be 0, to make sure that they always play, but sounds for physics can be 10 as it is not important if it skips the impact sounds every now and then.

For music, 0 is used for ambient music tracks, as that is most likely what you like to use for base music. Then playing a piece of event music as priority 10 will make sure it plays, and when it is over it stops and the priority 0 music will resume (ambient track).
Oh, that explains a lot. But I didn't know you can even set a sound priority Tongue.
Secondarily it says below music:
Quote:alPrio - priority of the music. Note that only the music with the highest priority can be heard! 0 - highest, 1 - lower, etc
Yeah, that's from the wiki. Lower is higher.

In the study where you first encounter a real grunt there's horror music, and then there's the normal grunt music. The same also happens in penumbra, when you first encounter a dog.

That's what I'd like to achieve.