Theora video question
by Jesse P · in Torque Game Engine · 01/05/2009 (7:37 pm) · 1 replies
I need to put a 2 minute+ video at the end of my game and it is giving me a world of headaches. All other Theora videos were short several second clips that had no problems with a schedule command, but that doesn't work on different machines with such a long video, so what I desperately need is the syntax on how to make a command execute as soon as, and only when, the video is done playing. Please let me know if anyone knows of a way to make this possible. Thanks
Here is the code I am using right now simply to play the video, but it kills it after a few seconds due to the schedule. Is there already a "done" member in the hard code of GuiTheoraCtrl or something like that? I need some help here, I'm not the best programmer:
Here is the code I am using right now simply to play the video, but it kills it after a few seconds due to the schedule. Is there already a "done" member in the hard code of GuiTheoraCtrl or something like that? I need some help here, I'm not the best programmer:
new GuiTheoraCtrl(Mis7EndCut) {
canSaveDynamicFields = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "0 0";
Extent = "640 480";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
hovertime = "1000";
theoraFile = "./cutscenes/anthem.ogg";
done = "0";
stopOnSleep = "1";
backgroundColor = "0 0 0 255";
};
function loadMis7EndCut()
{
Mis7EndCut.done = false;
Canvas.setContent( Mis7EndCut );
schedule(100, 0, checkMis7EndCutDone );
}
function checkMis7EndCutDone()
{
if (Mis7EndCut.done == true) //for some reason is ALWAYS evaluating as true
{
echo ("*** End Game ");
$Game::Schedule = schedule($Game::EndGamePause * 600, 0, "onCyclePauseEndEND");
}
else
schedule(100, 0, checkMis7EndCutDone );
}
Torque Owner Jesse P
I commented out the theoraFile = "./cutscenes/anthem.ogg"; in the GuiTheoraCtrl
and then added
Mis7EndCut.setFile("starter.fps/server/scripts/cutscenes/anthem.ogg");
in the loadMis7EndCut function