Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: NightQuest on Sat 19/06/2004 16:25:00

Title: PlayVideo ("intro.avi", 0, 1);
Post by: NightQuest on Sat 19/06/2004 16:25:00
hey,

when i try to intro room it gets an error saying "There was an error compiling your script. the problem was: In: 'main script'
error [line 3] Phrase error: unexpected 'PlayVideo'


and the intro.avi is in the compile folder.


heres the code if you need it:


// intro logo

PlayVideo ("intro.avi", 0, 1);


not much but if anyone could help i'd really apriciate it.

~Nightquest2~

Title: Re: PlayVideo ("intro.avi", 0, 1);
Post by: Ashen on Sat 19/06/2004 18:09:19
Can you post the lines around that line? The "unexpected 'PlayVideo'" sounds like AGS thinks it come in the middle of a line (e.g. if you've missed the ; on the line before). Also, where in the script have you put that line?
Title: Re: PlayVideo ("intro.avi", 0, 1);
Post by: NightQuest on Sat 19/06/2004 18:11:22
thats it i thought i could just do that and make it play can you help me? ???
Title: Re: PlayVideo ("intro.avi", 0, 1);
Post by: Ashen on Sat 19/06/2004 18:17:51
When do you want it to play? And, where in the script have you put it?

If you want it to play as an intro movie (since it IS called intro.avi  ;D) it probablyneeds to be in the 'Player enters room (after fadein)'  interaction of the room the player starts in.

Did you put it in the 'game_start' section of the global script? I don't think it can be called from there.
Title: Re: PlayVideo ("intro.avi", 0, 1);
Post by: NightQuest on Sat 19/06/2004 18:20:52
well its a logo for when the game starts up and i dont have a script all i got is what i showed, sorry.

Title: Re: PlayVideo ("intro.avi", 0, 1);
Post by: Ashen on Sat 19/06/2004 18:22:49
So, WHERE have you put what you've got? What did you type it in to?
Title: Re: PlayVideo ("intro.avi", 0, 1);
Post by: NightQuest on Sat 19/06/2004 18:27:35
i put it in the room script editor, the intro room



do you have msn messenger cuz i dont like talking over a forum...
Title: Re: PlayVideo ("intro.avi", 0, 1);
Post by: Ashen on Sat 19/06/2004 18:38:27
OK, go to MSN
Title: Re: PlayVideo ("intro.avi", 0, 1);
Post by: NightQuest on Sat 19/06/2004 18:40:18
my messenger is nightquest2@msn.com


thnx
Title: Re: PlayVideo ("intro.avi", 0, 1);
Post by: Ashen on Sat 19/06/2004 18:51:08
OK, MSN is being strange.... Try this for now.

On the 'settings' pane of the intro room, there's a row of buttons. The {} one opens the room script. Next to it is one with a red 'i' on it. Click that, choose 'Player enters room (after fadein)', add a 'Run Script' interaction, and make the script

PlayVideo ("intro.avi", 0, 1);

Save and exit the script, and go back into the room script. You should see something like:

// room script file

PlayVideo ("Intro.avi", 0, 1);
function room_a() {
  // script for room: Player enters screen (after fadein)
PlayVideo ("Intro.avi", 0, 1); 
}

Remove the first PlayVideo command. Test the game, hopefully it'll work.
Title: Re: PlayVideo ("intro.avi", 0, 1);
Post by: NightQuest on Sat 19/06/2004 19:01:24
YES!!! thnx

do you have any games made?
Title: Re: PlayVideo ("intro.avi", 0, 1);
Post by: Iwan on Tue 22/06/2004 17:22:55
I'm having a problem with playing my intro too.

The script line is:

Quote// room script file

PlayVideo ("intro.avi", 1, 1);}

and i've saved the avi file in the compiled folder, intro.avi.

When the screen comes up it displays:

(http://www.2dadventure.com/ags/helpscrenee.png)


Can anyone help?

Thanks,

Iwan

Title: Re: PlayVideo ("intro.avi", 0, 1);
Post by: Ashen on Tue 22/06/2004 18:13:20
What did you make the avi in? Could it be a problem with the codecs?
Title: Re: PlayVideo ("intro.avi", 0, 1);
Post by: Iwan on Tue 22/06/2004 18:19:37
I'm using a program called aviquick. Is there a programm you would recommend i should use. I dont really understand the codecs.

Iwan
Title: Re: PlayVideo ("intro.avi", 0, 1);
Post by: strazer on Tue 22/06/2004 18:43:00
I searched for aviquick, the one I've found doesn't support sound.
If you don't need sound, why not make a fli/flc animation instead? You can use the Rad Video Tools (http://www.radgametools.com/smkdown.htm) to create one.
Otherwise, use TMPGEnc (http://www.tmpgenc.net/) to compress your animation to MPEG-1 (VideoCD) format. It is present on all Windows versions by default, so people won't need to install additional codecs.

Edit:
FLI supports only one resolution: 320x200 with 256 colors
FLC supports any resolution up to 1024x768 with 256 colors.
Title: Re: PlayVideo ("intro.avi", 0, 1);
Post by: Iwan on Tue 22/06/2004 18:48:45
Thanks strazer. I'll try i out.