Help with adding video cutscene between levels

Posted By: jsaechao

Help with adding video cutscene between levels - 03/10/08 16:32

Do anyone know how to add a video cutscene between levels? I know how to add levels and cutscenes in the game by using the preset script templates, but I don't know how to play a cutscene after a level. I tried adding an intro video in level 2 but when the player enters level 2, the game skips the intro video. But when I run level 2 by itself, it plays the intro video.
Posted By: Anonymous

Re: Help with adding video cutscene between levels - 03/11/08 06:43

load a empty level (no player/npc/... actions) and start your video (maybe by an starter-entity in the level or by script).
wait until the video is played (or the user interrupts it) and load the next game level.
Posted By: jsaechao

Re: Help with adding video cutscene between levels - 03/11/08 16:25

npc?? How do you put a starter-entity in the level?
Posted By: xbox

Re: Help with adding video cutscene between levels - 03/11/08 22:19

here try this instead
make a new script and name it what ever you want.
put this code in the new script then include the new script in your main script
Code:
 string loading_video = <video.mpg>;  //Change to your video
bmap loading_lv = <loading.bmp>; //Change to what ever
panel loadingscreen {
bmap = loading_lv; //loading screen name
flags = refresh,d3d;
}

function movie_play()
{
media_play (loading_video, loading_lv, 77);
}

function load_level()
{
loadingscreen.pos_x = (screen_size.x - bmap_width(loading_lv))/2; //centers loading screen
loadingscreen.pos_y = (screen_size.y - bmap_height(loading_lv))/2;

loadingscreen.visible = on; //displays loading screen
movie_play();
wait(3);
sleep(2);
loadingscreen.visible = off; //clears screen
bmap_purge(loading_lv);
LOAD_LEVEL <-->levelname<-->; //level name

}}


ACTION levelchange //*assign this to a map entity blocking the way out of the level*/!!!!
{

MY.INVISIBLE = ON; //makes entitie invisible
MY.ENABLE_IMPACT = ON; //enables player impact
MY.EVENT = load_level; //function name

}


That should work. Although there might be a problem when the video plays, it may not play the whole thing. I don't know. I'm pretty sure it will work though. BTW, this is written in A6 C-Script not A7 Lite-C.
Posted By: jsaechao

Re: Help with adding video cutscene between levels - 03/12/08 04:54

Thank you. I will give it a try.
Posted By: jmasterx

Re: Help with adding video cutscene between levels - 03/17/08 19:32

@xbox

could you make me an action that makes a sound play on a trigger? thanks
Posted By: xbox

Re: Help with adding video cutscene between levels - 03/27/08 17:09

Do you mean something like this
Code:
Sound* mysound = <sound.wav>; //Put your sound here
var mysound_handle;


function play_mysound()
{
mysound_handle = snd_play(mysound, 100, 0);
}

action iplaysound //attach this to the block that you want to trigger the sound
{
MY.VISIBLE = OFF;
MY.ENABLE_IMPACT = ON;
MY.EVENT = play_mysound();
}

Here Hope this helps.
Posted By: Quad

Re: Help with adding video cutscene between levels - 03/27/08 17:48

function play_mysound()
{
mysound = my.string1;
mysound_handle = snd_play(mysound, 100, 0);
}

i suggest using this as event, thus you can set which sound will be played by editin entity's(trigger?) string1 in wed.
© 2024 lite-C Forums