Roenlond
Senior Member
Posts: 331
Threads: 3
Joined: Apr 2011
Reputation:
0
|
RE: Need help with a basic script...
(05-03-2011, 05:35 PM)Lambda Wrote: Hi!
I'm very new to scripting, so i tried a basic map, and i tried using music within, but that went wrong.
I have no real area's in the map for it yet, i just want the selected music track to play, wich doesnt work.
Current code:
void OnStart()
{
{
(PlayMusic("asMusicFile, "07_amb.ogg", abLoop, false, afVolume, "5", afFadeTime, "0", alPrio, "0","));
}
}
void OnEnter()
{
}
void OnLeave()
{
}
Error Message i get when i try to run:
FATAL ERROR: Could not load script file 'maps/main/tutorialmap.hps'!
main (7,31) : Err : Expected ')' or ','
Please, i have no programming/scripting experience at ALL before this, and this is my first attempt to add something to the basic script. So don't hate me if this is an obvious thing.
I've tried multiple things, but it all didn't work.
Thanks,
Lambda
the asMusicFile, abLoop, etc, should not be there. You need to remove those and only leave your own text. Numbers do not need quotes unless it's a string. Since it's an ambience, you probably want it to loop. To do that, change the "false" to "true". The PlayMusic command also doesn't need ".ogg" to function. Good luck
Like so;
void OnStart()
{
PlayMusic( "07_amb", false, 5.0, 0.0f, 0);
}
(This post was last modified: 05-03-2011, 05:46 PM by Roenlond.)
|
|
05-03-2011, 05:44 PM |
|