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

Started by NightQuest, Sat 19/06/2004 16:25:00

Previous topic - Next topic

NightQuest

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~


Ashen

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?
I know what you're thinking ... Don't think that.

NightQuest

thats it i thought i could just do that and make it play can you help me? ???

Ashen

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.
I know what you're thinking ... Don't think that.

NightQuest

well its a logo for when the game starts up and i dont have a script all i got is what i showed, sorry.


Ashen

So, WHERE have you put what you've got? What did you type it in to?
I know what you're thinking ... Don't think that.

NightQuest

i put it in the room script editor, the intro room



do you have msn messenger cuz i dont like talking over a forum...

Ashen

I know what you're thinking ... Don't think that.


Ashen

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.
I know what you're thinking ... Don't think that.

NightQuest

YES!!! thnx

do you have any games made?

Iwan

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:




Can anyone help?

Thanks,

Iwan


Ashen

What did you make the avi in? Could it be a problem with the codecs?
I know what you're thinking ... Don't think that.

Iwan

I'm using a program called aviquick. Is there a programm you would recommend i should use. I dont really understand the codecs.

Iwan

strazer

#14
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 to create one.
Otherwise, use TMPGEnc 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.

Iwan

Thanks strazer. I'll try i out.

SMF spam blocked by CleanTalk