|
2 registered members (AndrewAMD, Quad),
5,104
guests, and 3
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Skip Intro with a key?
[Re: Lukas]
#320043
04/19/10 14:16
04/19/10 14:16
|
Joined: Jan 2004
Posts: 60
Deha
OP
Junior Member
|
OP
Junior Member
Joined: Jan 2004
Posts: 60
|
My function(short form) var x function start_program() { mouse_mode = 0; wait(1); freeze_mode = 1; media_play("intro.wmv",NULL,100); wait(999); wait(999); wait(999); wait(999); wait(999); wait(999); wait(999); wait(999); wait(39); media_stop(x); freeze_mode = 0; set(loadingscreen_panel, SHOW); ... } I know it is not a really clean programming code, but it works!  Where do i have to paste the 'if (key_space) then media_stop'? After media_play? need help please...:(
|
|
|
Re: Skip Intro with a key?
[Re: Lukas]
#320047
04/19/10 14:41
04/19/10 14:41
|
Joined: Jul 2008
Posts: 1,178 England
MrGuest
Serious User
|
Serious User
Joined: Jul 2008
Posts: 1,178
England
|
Well, I guess while you are playing your video, you have a loop like this:
while(media_playing(yourhandle)) wait(1);
If you use media_stop, it should also cancel your loop. how does that exactly skip or stop anything using spacebar? try something like
void game_start(){
}
void game_intro(){
var hnd_intro = media_play("intro.wmv",NULL,100);
while(media_playing(hnd_intro) && (!key_space)){
wait(1);
}
game_start();
}
void main(){
//...blah
wait(1);
game_intro();
}
hope this helps *untested*
|
|
|
|