3 registered members (NewbieZorro, TipmyPip, 1 invisible),
19,045
guests, and 8
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Video Cut Scene
[Re: mschoenhals]
#452265
06/07/15 21:12
06/07/15 21:12
|
Malice
Unregistered
|
Malice
Unregistered
|
It works fine without the intro video. So this work s fine?
function main()
{
vec_set(screen_size,vector(800,400,0));
vec_set(screen_color,vector(50,1,1)); // dark blue
vec_set(sky_color,vector(50,1,1)); // dark blue
video_window(NULL,NULL,0,"My New Game");
d3d_antialias = 1;
shadow_stencil = 3;
/////////////////////////////
// Video section
//var vid_handle=0; // create a local var to hold the media handle
//vid_handle=media_play("testvid.wmv",NULL, 75); //play media and set var
// loop only while var is valid
//while(vid_handle)
//{
//if(key_any) // check if any key was pressed
//media_stop(vid_handle); // stop vid
//wait(1); // required wait avoids endless looping
//}
///////////////////////////////////
//camera.ambient = 100;
camera.arc = 90; // set camera.arc to a proper value for shooter games
fps_max = 75; // limit the frame rate to 75 fps (not really needed)
video_screen = 1; // start the game in full screen mode
video_mode = 8; // run at a 1024x768 pixels resolution on monitors with a 4/3 aspect ratio
level_load ("shooter.wmb");
vec_set(camera.x,vector(-250,0,50)); //back X250 up z50
vec_set(camera.pan,vector(0,-15,0)); // TILTed down 15*
wait (3);
media_loop("action.mp3", NULL, 70); // start the soundtrack
}
if so I recommend moving video_screen and video_mode to the top. As well as adding wait(2); before the level load.
function main()
{
vec_set(screen_size,vector(800,400,0));
vec_set(screen_color,vector(50,1,1)); // dark blue
vec_set(sky_color,vector(50,1,1)); // dark blue
video_window(NULL,NULL,0,"My New Game");
d3d_antialias = 1;
shadow_stencil = 3;
camera.arc = 90; // set camera.arc to a proper value for shooter games
fps_max = 75; // limit the frame rate to 75 fps (not really needed)
video_screen = 1; // start the game in full screen mode
video_mode = 8; // run at a 1024x768 pixels resolution on monitors with a 4/3 aspect ratio
wait(1);
/////////////////////////////
// Video section
var vid_handle=0; // create a local var to hold the media handle
vid_handle=media_play("testvid.wmv",NULL, 75); //play media and set var
// loop only while var is valid
while(vid_handle)
{
if(key_any) // check if any key was pressed
{
media_stop(vid_handle); // stop vid
vid_handle=0;
}
wait(1); // required wait avoids endless looping
}
///////////////////////////////////
//camera.ambient = 100;
wait(2);
level_load ("shooter.wmb");
vec_set(camera.x,vector(-250,0,50)); //back X250 up z50
vec_set(camera.pan,vector(0,-15,0)); // TILTed down 15*
wait (3);
media_loop("action.mp3", NULL, 70); // start the soundtrack
}
it is possible the vid_handle was not set to 0 in the stop action. Also vid_screen_and vid_mode are first frame actions to be take before the first wait(if I recall).
Last edited by Malice; 06/07/15 21:16.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|