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
Engine Script Help
BrastaSauce Offline
Junior Member

Posts: 25
Threads: 4
Joined: Jun 2012
Reputation: 0
#1
Engine Script Help

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

07-13-2012, 06:26 AM
Website Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Engine Script 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.

Tutorials: From Noob to Pro
07-13-2012, 06:38 AM
Website Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#3
RE: Engine Script Help

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

Trying is the first step to success.
(This post was last modified: 07-13-2012, 08:14 PM by FlawlessHappiness.)
07-13-2012, 08:13 PM
Find
BrastaSauce Offline
Junior Member

Posts: 25
Threads: 4
Joined: Jun 2012
Reputation: 0
#4
RE: Engine Script Help

Thanks to both of you for helping me Big Grin

07-14-2012, 04:13 AM
Website Find




Users browsing this thread: 1 Guest(s)