Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: How to load a cutscene and intro  (Read 5091 times)

0 Members and 1 Guest are viewing this topic.

esmeco

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 6
  • I'm NOT a llama!
    • View Profile
How to load a cutscene and intro
« on: February 19, 2003, 04:43:06 PM »

Hi! I've got a problem. How can I make the engine run, when I start the game,the cutscene/intro, right before the menu?
Also, how can I make the menu to appear right after the intro, and the cutscene after you click on "New Game"?
Jus one more quaestion: Is it possible to make a verb coin appear, with the "Talk", "Use", "Pick up" commands, just like in Curse of Monkey Island?If it is how do u do so?
I know that's a lot of aquestions, but ya know, I'm just a begginer!

See ya!  8)
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:How to load a cutscene and intro
« Reply #1 on: February 19, 2003, 05:01:30 PM »

By "cutscene" do you mean an AVI video or a scripted in-game sequence?

Basically, if you explore the demo project, you'll see the following:

The "game.script" script file is executed first; in the demo, it loads the actor and then it loads a scene (Game.ChangeScene(...)) You'd have to change this script to either play a video (Game.PlayVideo("filename.avi")) or to load a scene, where your scripted intro sequence will take place.

As for the main menu, you should make a scene (empty, or with some background graphics). Note that the scenes have (by default) a "scene_init.script" script file attached. This script is executed when the scene is loaded in memory.
In your "menu" scene, you would load a window at startup, the window will contain buttons for load/new game etc.

Sooo, after your intro sequence is over, you'll load the "menu" scene, it will in turn load the main menu window and present it to the player.
After the playe clicks "new game", you'll just load another scene (the one where your game actually starts).

Whew, it sounds complicated, but in fact it's just a matter of a few script lines. Maybe I should make some demo on this topic, it will be probably handy to many beginners.

Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Rocco

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 87
    • View Profile
    • Virtual-Illusion
Video and Sound file similar
« Reply #2 on: June 30, 2005, 02:39:23 PM »

Hi,

is it possible to start a video file, and a sound file the together?
i tried it and have no success, cause the video stops the soundfile and resume it after the video is over, i guess.
i know that i can put the sound in the avi file, but in some cases it should be more comfortable to start it separately and control it from the engine.

i tried something like this:
Game.PlaySound("sounds/first.ogg");
// play the intro movie
Game.PlayVideo("videos/first.avi",2);

with the goal that these two files are played at the same time.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: How to load a cutscene and intro
« Reply #3 on: June 30, 2005, 05:41:01 PM »

is it possible to start a video file, and a sound file the together?
Something like that is possible in the latest build of wme which can be downloaded HERE. In this version the PlayVideo() method provides a new optional fifth parameter which specifies whether the music should be suspended. So you can do this:

Game.PlayMusic("sounds/first.ogg");
Game.PlayVideo("videos/first.avi", 2, 0, 0, false);
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Rocco

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 87
    • View Profile
    • Virtual-Illusion
Re: How to load a cutscene and intro
« Reply #4 on: June 30, 2005, 05:55:42 PM »

thx a lot, works great with PlayMusic.   :D
Logged
 

Page created in 0.074 seconds with 23 queries.