Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 04/25/26 16:09
Z9 getting Error 058
by jcl. 04/24/26 17:48
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
400 free seamless texture pack downl. here !
by NeoDumont. 04/08/26 19:55
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (TipmyPip, Grant), 3,389 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
valino, juergenwue, VladMak, Geir, ondrej
19209 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Splash screen with looping music #129375
05/11/07 03:56
05/11/07 03:56
Joined: Nov 2005
Posts: 68
S
scurvy Offline OP
Junior Member
scurvy  Offline OP
Junior Member
S

Joined: Nov 2005
Posts: 68
Was wondering if anyone could tell me how to put a looping wav file in the
splash screen script below. What I have tryed seems to crash when I try to
run it. My wav file title is song.wav to keep it simple. And what I want is it
to play over and over until the space bar is pressed to start the game. Below
is the script I have written with help from the forum.
Thank you

///////////////////////////////////////////////
// startup splash screens
// script written by william mason May 05,07
///////////////////////////////////////////////
bmap splash1 = <splash1.pcx>;
bmap splash2 = <splash2.pcx>;
bmap splash3 = <splash3.pcx>;
bmap splash4 = <splash4.pcx>;
bmap splash5 = <splash5.pcx>;

panel splash_1(){bmap = splash1;layer = 25;}
panel splash_2(){bmap = splash2;layer = 25;}
panel splash_3(){bmap = splash3;layer = 25;}
panel splash_4(){bmap = splash4;layer = 25;}
panel splash_5(){bmap = splash5;layer = 25;}

panel* screen_syn = splash_1;

var temper;

starter splash_start
{
freeze_mode = 1;
WHILE (1) {
temper=0;

WHILE (temper < 48) {
screen_syn .visible = on;
temper += time;
IF (key_space == 1) { screen_syn.VISIBLE = OFF; Goto finish; }
wait (1);
}
screen_syn.VISIBLE = OFF;
IF (screen_syn == splash_5) { screen_syn = splash_2; continue; }
IF (screen_syn == splash_4) { screen_syn = splash_5; }
IF (screen_syn == splash_3) { screen_syn = splash_4; }
IF (screen_syn == splash_2) { screen_syn = splash_3; }
IF (screen_syn == splash_1) { screen_syn = splash_2; }
}
finish :
freeze_mode = 0;
// remove bmaps from memory
bmap_purge(splash1);
bmap_purge(splash2);
bmap_purge(splash3);
bmap_purge(splash4);
bmap_purge(splash5);


}

Re: Splash screen with looping music [Re: scurvy] #129376
05/11/07 06:47
05/11/07 06:47
Joined: May 2004
Posts: 1,510
Denmark
Claus_N Offline
Serious User
Claus_N  Offline
Serious User

Joined: May 2004
Posts: 1,510
Denmark
Try this... Hope it works

Code:
///////////////////////////////////////////////
// startup splash screens
// script written by william mason May 05,07
///////////////////////////////////////////////
bmap splash1 = <splash1.pcx>;
bmap splash2 = <splash2.pcx>;
bmap splash3 = <splash3.pcx>;
bmap splash4 = <splash4.pcx>;
bmap splash5 = <splash5.pcx>;

sound song_wav = <song.wav>;
var_nsave song_handle = 0;


panel splash_1(){bmap = splash1;layer = 25;}
panel splash_2(){bmap = splash2;layer = 25;}
panel splash_3(){bmap = splash3;layer = 25;}
panel splash_4(){bmap = splash4;layer = 25;}
panel splash_5(){bmap = splash5;layer = 25;}

panel* screen_syn = splash_1;

var temper;

starter splash_start
{
freeze_mode = 1;
WHILE (1) {
temper=0;

song_handle = snd_loop(song_wav,100,0);

WHILE (temper < 48) {
screen_syn .visible = on;
temper += time;
IF (key_space == 1) { screen_syn.VISIBLE = OFF; Goto finish; }
wait (1);
}
screen_syn.VISIBLE = OFF;
IF (screen_syn == splash_5) { screen_syn = splash_2; continue; }
IF (screen_syn == splash_4) { screen_syn = splash_5; }
IF (screen_syn == splash_3) { screen_syn = splash_4; }
IF (screen_syn == splash_2) { screen_syn = splash_3; }
IF (screen_syn == splash_1) { screen_syn = splash_2; }
}
finish :

if(snd_playing(song_handle)) {snd_stop(song_handle);}

freeze_mode = 0;
// remove bmaps from memory
bmap_purge(splash1);
bmap_purge(splash2);
bmap_purge(splash3);
bmap_purge(splash4);
bmap_purge(splash5);


}




Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1