goodcap
Member
Posts: 193
Threads: 112
Joined: Jun 2012
Reputation:
3
|
How do I make a loading screen + music?
Hey guys, I was wondering if it's possible to show a loading screen while music is playing? (like the Bioshock loading screens)
If it's possible please put the script down below, it would help me alot :3
|
|
04-11-2014, 03:47 PM |
|
The chaser
Posting Freak
Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation:
113
|
RE: How do I make a loading screen + music?
I don't know right now, but I think that if you put:
void OnLeave()
{
PlayMusic("music.ogg", other parameters);
}
It should work while in the loading screen. Then, in the next level, playing another music would do just fine (I think, it has been a while since I don't code)
THE OTHERWORLD (WIP)
Aculy iz dolan.
|
|
04-11-2014, 04:56 PM |
|
goodcap
Member
Posts: 193
Threads: 112
Joined: Jun 2012
Reputation:
3
|
RE: How do I make a loading screen + music?
I got it now, how do I increase the loading times?
|
|
04-11-2014, 06:51 PM |
|
daortir
Senior Member
Posts: 422
Threads: 9
Joined: Sep 2013
Reputation:
18
|
RE: How do I make a loading screen + music?
The amount of text is what increases the loading time if I'm not mistaken ^^.
Basically the text determines a duration, like 10 seconds. Let's say the level loads in 15 seconds on someone's computer, then the screen will be there for, of course, 15 seconds.
But if on someone else's computer it loads in 5 seconds, he will be able to click to show the level after 5 seconds of loading, and at 10 seconds the screen will disappear automatically.
That's how I understood it at least ^^ !
(This post was last modified: 04-11-2014, 07:01 PM by daortir.)
|
|
04-11-2014, 06:59 PM |
|
Mudbill
Muderator
Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation:
179
|
RE: How do I make a loading screen + music?
Having increased loading time forced sounds like a bad idea, but you can always increase the optional time with the text, as daortir said. If the loading text is long and the map loads quickly, the text will remain until it has timed out, unless the player interacts.
Just remember that loading time is different for everyone. If you have a strong computer, it will obviously load faster than those on low and med specs.
(This post was last modified: 04-11-2014, 07:03 PM by Mudbill.)
|
|
04-11-2014, 07:03 PM |
|
goodcap
Member
Posts: 193
Threads: 112
Joined: Jun 2012
Reputation:
3
|
RE: How do I make a loading screen + music?
Okay, thank you One more question, how do I make the music stop as soon as the loading screen is over?
|
|
04-12-2014, 12:23 PM |
|
Mudbill
Muderator
Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation:
179
|
RE: How do I make a loading screen + music?
void OnLeave() { StopMusic(FadeTime, Priority); }
I think that comes into effect when the loading is done. Otherwise you can just stop the music in OnStart or OnEnter of the next level. Don't forget to change the parameters. FadeTime you can set to like 3, priority needs to match the priority of what you have in PlayMusic.
(This post was last modified: 04-12-2014, 12:55 PM by Mudbill.)
|
|
04-12-2014, 12:54 PM |
|
goodcap
Member
Posts: 193
Threads: 112
Joined: Jun 2012
Reputation:
3
|
RE: How do I make a loading screen + music?
The music still continues playing :/ This is what I have right now:
{
SetupLoadScreen("Loading", "LoadScreen1", 0, "LoadScreenImage1.png");
PlayMusic("test.ogg",false, 100, 0, 1, false);
StopMusic(3, 1);
}
|
|
04-12-2014, 01:21 PM |
|
Mudbill
Muderator
Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation:
179
|
RE: How do I make a loading screen + music?
Why do you have PlayMusic and StopMusic in the same place? Those would just cancel out each other. Since they both have priority 1, StopMusic ends PlayMusic immediately, and any music already playing at a priority other than 1 will keep playing.
|
|
04-12-2014, 02:06 PM |
|
|