Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Wed 27/07/2005 17:28:01

Title: Using AVI\MPG\ with AGS for an Intro Movie [SOLVED]
Post by: on Wed 27/07/2005 17:28:01
Hey there, you can tell by my number of posts that this is my first post  ;)
I used Dark Basic a year and a half ago, working an adventure game strictly in script, but time and the job got me away from it.  Finding AGS I'm getting back into it, and have dozens of screens finished for the game I've been working on.   My question is probably very simple, and I did search the tech pages for an answer but only found one link referring to it:

http://www.adventuregamestudio.co.uk/yabb/index.php?topic=10086.0

I guess in my fiddling with it at 2am in the morning I couldn't find any option to run an AVI file as an intro movie.  I have the 2 minute intro completed ( I work with 3dmaxadobe) and I'm looking for a simple help to slap the video as the intro.  I did it in dark basic and for some god awful reason I can't remember how the heck I figured it out using the script that time ago.

Any help?

Title: Re: Using AVI\MPG\ with AGS for an Intro Movie
Post by: DoorKnobHandle on Wed 27/07/2005 17:38:36
Look the "PlayMovie ( ... )" function up in the manual.

Welcome to the forums, by the way.
Title: Re: Using AVI\MPG\ with AGS for an Intro Movie
Post by: on Wed 27/07/2005 17:42:26
Thanks a lot man. That'll take me in the right direction.

The banner in your signature . Your project?   If so, how's it coming? 

<-- Fate of Atlantis Fan
Title: Re: Using AVI\MPG\ with AGS for an Intro Movie
Post by: DoorKnobHandle on Wed 27/07/2005 18:48:18
QuoteThanks a lot man. That'll take me in the right direction.

Glad I could help.

QuoteThe banner in your signature . Your project?   If so, how's it coming? 

I send you a PM about that matter.
Title: Re: Using AVI\MPG\ with AGS for an Intro Movie
Post by: TerranRich on Fri 29/07/2005 00:14:18
ADDED to the BFAQ: http://bfaq.xylot.com/#coding17

:)
Title: Re: Using AVI\MPG\ with AGS for an Intro Movie [SOLVED]
Post by: on Wed 03/08/2005 04:58:31
The video is supposed to play before the first room appears, thus it needs to be played "before the game start"

this is what my script looks like after i put the test file in the game directory under 3 different formats trying to get it to work

PlayVideo ("test.wmv" 1, 1,);

Now logically there is no reason that won't work because that is all the manual tells you to do, but realistically, I'm guessing you need to place it somewhere specific or assign some other piece of script to it as well.  such as Function? // ? 
Title: Re: Using AVI\MPG\ with AGS for an Intro Movie [SOLVED]
Post by: Gilbert on Wed 03/08/2005 05:11:40
Everything scriptwise, except variable declarations, #defines, etc. and the like, must be placed in functions.

There's no way you can play a movie "before the first room starts", putting it in the game_start() function of the global script probably won't work since that function is for some basic initializations only.
Your best bet is to put it in "player enters screen for the first time / after fadein" of the starting room, but if you're using a room transition effect there'll be some spilt seconds with the room background appearing before the movie starts.
To avoid this, you need to make a blank room, with pure black background, and make this the starting room, just add the following lines into "player enters screen for the first time / after fadein":
PlayVideo(blah);
NewRoom(blah); //go to the REAL first room, need to be modified if you use V2.7+