Cut Scene ogg ogm ogv script
by Path · in Torque Game Builder · 02/24/2009 (9:12 am) · 6 replies
What's the code to play a cut scene ogg / ogm / ogv file in TGB?
I've got everything else worked out in my first mini game. I just need to know how to get my cut scenes to play at the beginning of the designated new levels.
I've got everything else worked out in my first mini game. I just need to know how to get my cut scenes to play at the beginning of the designated new levels.
About the author
Recent Threads
#2
02/24/2009 (10:23 am)
Thank you much I'll look into it.
#3
Here's the instructions and script I've found:
=======Instructions===============
GuiTheoraCtrl
Video playback in a GUI may be accomplished by using the GuiTheoraCtrl - just call setFile on it, passing it the path of the video file, and it will play it. If you're interested in integrating the playback in other areas of the engine, look at the TheoraTexture class - it manages rendering Theora video to a GL texture, which can then be rendered or otherwise used.
So you should have something like this:
new GuiTheoraCtrl(MyVideo) {
profile = "GuiDefaultProfile";
horizSizing = "relative";
vertSizing = "relative";
position = "40 25";
extent = "320 240";
minExtent = "8 2";
visible = "1";
done = "0";
stopOnSleep = "1";
backgroundColor = "0 0 0 255";
};
Go to the Console and use this command:
MyVideo.setFile("starter.fps/data/video/menuvideo.ogg");
To stop the video use, stop() on the GuiTheoraCtrl. You can set this command to be a button.
=======Instructions===============
Does the first part into its own .gui file or is it added to the mainscreen.gui? I've tried both with little success.
For the second line:
MyVideo.setFile("starter.fps/data/video/menuvideo.ogg");
It says to add it to the "console" but what exactly does that mean?
Inside TGB? Inside a behavior you need to create? Is an new interface supposed to be created that I'm missing?
Please Advise.
02/24/2009 (4:50 pm)
Thanks for the direction so far, but does anyone know what PROPER next step is? I can seem to get this thing into motion. Here's the instructions and script I've found:
=======Instructions===============
GuiTheoraCtrl
Video playback in a GUI may be accomplished by using the GuiTheoraCtrl - just call setFile on it, passing it the path of the video file, and it will play it. If you're interested in integrating the playback in other areas of the engine, look at the TheoraTexture class - it manages rendering Theora video to a GL texture, which can then be rendered or otherwise used.
So you should have something like this:
new GuiTheoraCtrl(MyVideo) {
profile = "GuiDefaultProfile";
horizSizing = "relative";
vertSizing = "relative";
position = "40 25";
extent = "320 240";
minExtent = "8 2";
visible = "1";
done = "0";
stopOnSleep = "1";
backgroundColor = "0 0 0 255";
};
Go to the Console and use this command:
MyVideo.setFile("starter.fps/data/video/menuvideo.ogg");
To stop the video use, stop() on the GuiTheoraCtrl. You can set this command to be a button.
=======Instructions===============
Does the first part into its own .gui file or is it added to the mainscreen.gui? I've tried both with little success.
For the second line:
MyVideo.setFile("starter.fps/data/video/menuvideo.ogg");
It says to add it to the "console" but what exactly does that mean?
Inside TGB? Inside a behavior you need to create? Is an new interface supposed to be created that I'm missing?
Please Advise.
#4
http://www.garagegames.com/community/resources/view/15114
My script questions can be found on the thread.
02/25/2009 (3:54 pm)
I found another resource that seems to have a simpler code but I need some translation of the instructions:http://www.garagegames.com/community/resources/view/15114
My script questions can be found on the thread.
#5
http://www.garagegames.com/community/forums/viewthread/85847
He needs help trying to figure out the script for looping ogg's if anyone knows the answer.
I've also started to use HandBrake for ogm files because the files I've created in Avidemux doesn't contain the necessary headers for the ogm that leads to errors.
02/26/2009 (10:08 pm)
Found my answer over on:http://www.garagegames.com/community/forums/viewthread/85847
He needs help trying to figure out the script for looping ogg's if anyone knows the answer.
I've also started to use HandBrake for ogm files because the files I've created in Avidemux doesn't contain the necessary headers for the ogm that leads to errors.
#6
http://www.garagegames.com/community/forums/viewthread/48713
My only issue now is trying to figure out how to add functions to this .gui so I can control the click through & load next level command.
I pulled the functions from the GuiAviBitmapCtrl code, but can't seem to integrate them into theora even though they both have very similar structures.
03/07/2009 (11:25 am)
For those trying to figure out this problem, this post helped fill in a lot of blanks:http://www.garagegames.com/community/forums/viewthread/48713
My only issue now is trying to figure out how to add functions to this .gui so I can control the click through & load next level command.
I pulled the functions from the GuiAviBitmapCtrl code, but can't seem to integrate them into theora even though they both have very similar structures.
Torque 3D Owner Simon Jensen
SwiftThought Games
tdn.garagegames.com/wiki/GUI/Video