|
1 registered members (TipmyPip),
18,631
guests, and 7
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Splash screens loop
[Re: scurvy]
#127769
05/03/07 11:19
05/03/07 11:19
|
Joined: Jun 2006
Posts: 2,640 Earth
Germanunkol
Expert
|
Expert
Joined: Jun 2006
Posts: 2,640
Earth
|
Code:
var show_splash_now;
function end_slash() { show_splash_now = 0; }
on_space = end_splash;
function show_splash() { show_splash_now = 1; while(show_splash_now == 1) { freeze_mode = 1; splash_1.visible = on; sleep (3); splash_1.visible =off; splash_2.visible = on; sleep (3); splash_2.visible =off; splash_3.visible = on; sleep (3); splash_3.visible =off; splash_4.visible = on; sleep (3); splash_4.visible =off; } freeze_mode = 0; }
?
~"I never let school interfere with my education"~ -Mark Twain
|
|
|
Re: Splash screens loop
[Re: scurvy]
#127770
05/03/07 11:21
05/03/07 11:21
|
Joined: Jan 2007
Posts: 651 Germany
RedPhoenix
User
|
User
Joined: Jan 2007
Posts: 651
Germany
|
Not tested but try it:
/////////////////////////////////////////////// // startup splash screens // script written by william mason May 02,07 /////////////////////////////////////////////// bmap splash1 = <splash1.pcx>; bmap splash2 = <splash2.pcx>; bmap splash3 = <splash3.pcx>; bmap splash4 = <splash4.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* screen_syn = splash_1;
starter splash_start { freeze_mode = 1; WHILE (1) { WHILE (temper < 48) { screen_syn .visible = on; temper += time; IF (KEY_SPACE == 1) { screen_syn.VISIBLE = OFF; return; } wait (1); } screen_syn.VISIBLE = OFF; IF (screen_syn == splash_4) { screen_syn = splash_1; continue; } 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; } wait (1); }
freeze_mode = 0;
// remove bmaps from memory bmap_purge(splash1); bmap_purge(splash2); bmap_purge(splash3); bmap_purge(splash4);
P.S. The bracket for closing the starter is missing!
EDIT: @Germanunkol You were faster, but in your code the loop will go on until he's finished and not break at once when space is pressed
Last edited by RedPhoenix; 05/03/07 11:25.
|
|
|
Re: Splash screens loop
[Re: RedPhoenix]
#127771
05/03/07 16:19
05/03/07 16:19
|
Joined: Jun 2006
Posts: 2,640 Earth
Germanunkol
Expert
|
Expert
Joined: Jun 2006
Posts: 2,640
Earth
|
agreeed, I forgot about that part, sorry... you win^^
~"I never let school interfere with my education"~ -Mark Twain
|
|
|
Re: Splash screens loop
[Re: scurvy]
#127773
05/04/07 07:45
05/04/07 07:45
|
Joined: Jun 2006
Posts: 2,640 Earth
Germanunkol
Expert
|
Expert
Joined: Jun 2006
Posts: 2,640
Earth
|
can you tell us what the errors are? you should use redphoenix's, it's better than mine... but I think it's scripted in lite_c...?
~"I never let school interfere with my education"~ -Mark Twain
|
|
|
Re: Splash screens loop
[Re: Germanunkol]
#127774
05/04/07 10:04
05/04/07 10:04
|
Joined: Jan 2007
Posts: 651 Germany
RedPhoenix
User
|
User
Joined: Jan 2007
Posts: 651
Germany
|
No it's c_script. But I forgot something: var temper; over the starter. I'm using this var by default so I forgot the it's not declared in your code.
EDIT: And another thing I forgot:
It will may be better to do it like this: IF (key_space == 1) { screen_syn.VISIBLE = OFF; Goto finish; }
This will replace the old IF structure.
But you have to declare a label to jump to:
finish :
Put this under the end of the While (1) { } structure.
Last edited by RedPhoenix; 05/04/07 10:11.
|
|
|
|
|
|