Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: pbs with video intro  (Read 3425 times)

0 Members and 1 Guest are viewing this topic.

dreamfighter

  • Supporter
  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 28
    • View Profile
pbs with video intro
« on: March 22, 2008, 06:15:07 PM »

Hello everybody

i'm new on this forum. thank you very much to the creators of this fabulous engine.
i don't know anythings in scripting. i searched all the post talking about video. i tried various things that i read but i have always pbs.
i want to put an avi video on intro of my game: so when i test my game i want to have this video first, and intro wintermute (intro logo) and after to have the menu of my game.
how can i do that?
i tried to copy  this command in a script of a new scene that i created changin info path and name with mine but it doesn't work
Game.PlayVideo("path\MyVideo.avi");
i'm really newbies and i don't understand how to do
someone can help me?
thanks
Logged

Jyujinkai

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 352
    • View Profile
    • Jyujinkai's WME Development Blog
Re: pbs with video intro
« Reply #1 on: March 22, 2008, 08:51:20 PM »

theora is the video format supported by WME natively. This is the code I used to do what you are talking about.

Play a video fullscreen scene
Code: WME Script
  1. actor.Active = false;
  2. Sleep(1000);
  3. var videointro = Scene.CreateEntity();
  4. videointro.PlayTheora("Video\LogoTumbles\Long_1024x768.ogg");
  5. Sleep(16000);
  6. //Game.Interactive = true;
  7. Scene.FadeOut(2000);
  8. Game.ChangeScene("scenes\scenename.scene");

This example loads a logo tumble theora video file. Playing it full screen. The script then sleeps for a while (length of the video) and then fades out over some time and loads the next scene.. with could be any scene including another logo.

Also in your scene make a single entity that you left click to "skip" the sequence.. just make the entity the same size as you screen.

Skip Code
Code: WME Script
  1. on "LeftClick"
  2. {
  3.   Game.ChangeScene("Locations\SW\OldTown\Road\road01\road01.scene");
  4. }
Logged
<Antoine de Saint-Exupéry> In any thing at all, perfection is finally attained not when there is no longer anything to add, but when there is no longer anything to take away...
<Carl Sagan> If you want to make a apple pie from scratch. You must first... invent the universe

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: pbs with video intro
« Reply #2 on: March 22, 2008, 09:34:06 PM »

Convert your FMV video to Theora and then call

Game.PlayTheora(path to your theora file);

For converting to theora I personally use ffmpeg2theora, which can be downloaded here: http://v2v.cc/~j/ffmpeg2theora/

and it works perfect for all my videos.

Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

Jyujinkai

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 352
    • View Profile
    • Jyujinkai's WME Development Blog
Re: pbs with video intro
« Reply #3 on: March 23, 2008, 01:17:33 AM »

Some members have made some tutorials on converting to theora you might want to look at if you are new to converting video to different codecs.

How to Transcode a OGG files from an existing video and audio files on your Harddrive - Beginner
Ogg Theora - Or, how to convert them and have them play correctly - Posted by CMK2901
Logged
<Antoine de Saint-Exupéry> In any thing at all, perfection is finally attained not when there is no longer anything to add, but when there is no longer anything to take away...
<Carl Sagan> If you want to make a apple pie from scratch. You must first... invent the universe

dreamfighter

  • Supporter
  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 28
    • View Profile
Re: pbs with video intro
« Reply #4 on: March 23, 2008, 06:54:30 AM »

thank you very much to everybody for your replies and your help
Logged
 

Page created in 0.043 seconds with 20 queries.