Hey guys. This project is due tomorrow! We need a quick response if possible.
Pretty much, when the boss shows up on screen, we want to fade out the stage music and turn on the boss music.
However, we don't know how to get the handle on a sound. There is no orxObject_GetSound, and when we get the sound, how should we manipulate it?
Comments
If not, you can get the latest added sound to an object (orxObject_GetLastAddedSound()) and then manipulate it with the orxSound_* interface.
Good luck for the last rush!
So, how do I use an fx to fade out? I don't see it in the docs...
Well it's like any FX, except you use Type = volume in the slot instead of scale, color, etc.
You can also modify the pitch the same way.
Here's an example (typed directly in the forum, so not guaranteed 100%):
EDIT: I assumed the new music object was set with Volume = 0 by default but we can simply removing that assertion by muting the sound in the first frame. I updated the example above accordingly.
EDIT2: Also, I forgot to mention that with the svn version you can affect the object's sound volume directly with orxObject_SetVolume() if need be.