Frictional Games Forum (read-only)

Full Version: Engine Script Help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Okay, so here's the deal. I want to know how to put a custom song into my game. I don't need the tutorial on that. Well I go to the wiki and like every other engine script it's in this format.

void PlayMusic(string& asMusicFile, bool abLoop, float afVolume, float afFadeTime, int alPrio, bool abResume);


Well obviously I can't just put that into my .hps file and it would work. Basically how do I convert it (hope this makes sense) and I don't just want to know how to convert this one. I wanna know the trick to convert any of them for future needs.

Thanks for any help
You mean, how to translate the function definition into a function call? You'll have to understand what arguments are and the different data types. A string, generally speaking, is anything surrounded by quotation marks. A boolean (or bool) is either true or false. A float is a (32-bit) decimal point number. And an int is any (32-bit) whole number.
Load your music file in Audacity
Export as .ogg
Move the file to the folder: redist\music

PlayMusic("MusicFile.ogg", false,5, 1, 10, true);

Aaaaaand remember to include the file when you upload the CS
Thanks to both of you for helping me Big Grin