Just a little doubt ...

Started by albertisland88, Mon 28/03/2011 00:13:23

Previous topic - Next topic

albertisland88

Hi, yesterday i posted a question of how can i do to play an animation made in flash to play on the game as an intro. Well, i got the answer, the answer was "just import as an AVI video" I dont remember well but, anyway:
  I read the manual and i found out how to play videos, but not how to import it ... exactly ... well is just a little doubt, where do i have to put the video so the Game can read it?
  It have to appear on the Room 1, as the intro.

I puted

// room script file

And as the Manual Said
PlayVideo ("INTRO.avi", 1,  1)

   But it show me this error:

room1.asc(3): Error (line 3): Parse error: unexpected 'PlayVideo'

  What do i'm doing wrong.

       Again sorry for my bad english, and my very stupid question, is just i'm a beginner and i just have that question to do, i understand all the codes all programming stuffs but i don't know how to import correctly an AVI file.
  Again sorry if this bother you guys, so please no bad words like dickhead, asshole, idiot, stupid, ok? Im having heart problems and doctor says evide things that make me get nuts, and i want to leave a little bit longer so i can show the world the good i am creating games.
   Thanks

Matti

Well, it seems that you didn't put the playvideo command inside any function. Make sure it's called within room load or the rep-exe.

Khris

Chill, nobody here is going to insult you just because you asked a question. I can get slightly sarcastic on occasion, but that's it :)

First of all, you don't need to import the video file, just copy it into the Compiled folder.

Now, the problem you have is you put the command directly into the script instead of inside a function. AGS wouldn't know when to call it, so this is not allowed.
Funny thing is, this is actually probably the most common beginner's problem of all time and has been asked and answered well over fifty times.

What you do is determine the event where the command takes place, in this case it is the room event "Enters room after fade-in". So open room 1 (double-click "Edit room"), click the lightning bolt icon, then click on the event text, then on the little ... button.

This will add the function to the room script and open it. Now put the command between { and }.

SMF spam blocked by CleanTalk