Playing a Video In-Game?

Started by Sickened, Tue 28/06/2011 07:02:49

Previous topic - Next topic

Sickened

Thanks for that, I feel kind of stupid considering I read that before and must have totally missed that... but I put my video (titled "introduction.ogv") into the Compiled folder, and put the following script into the room:

function room_AfterFadeIn()
{
    PlayVideo(introduction.ogv, eVideoSkipEscKey, 1);
}

and an error comes up when I run the game that says:

room1.asc(10): Error (line 10): undefined symbol 'introduction'

Did I do something wrong with the script now or what?

Matti

Yes, you did:

PlayVideo("introduction.ogv", eVideoSkipEscKey, 1);

Sickened

I changed that, now the game loads normally and when it gets to the "Room" (which is a blank black screen) it says "Unable to load video "introduction.ogv""... If this is of any relevance, the converter I used had converted the original video to a video called "introduction.theora.ogv" and I've tried it with renaming it just "introduction.ogv" and the other way but I'm not sure if that matters.

monkey0506

Theora videos can be compiled into your game. OGG Theora videos (.OGV) get placed in your game project folder (in the same place as where your Game.agf file is at). Any other video type goes in the Compiled folder.

Khris

Sorry for posting the "wrong" portion, but in the manual entry it does say where to put theora files:

Quotejust make sure the file has a .OGV extension and is placed in your main game folder

The example right there on the manual page also has quotemarks around the filename:

QuotePlayVideo("intro.mpg", eVideoSkipEscKey, 1);

While we gladly do help with any other problem, reiterate stuff that's clearly mentioned in the manual not so much.

Sickened

I apologize, I obviously wasn't reading too thoroughly through that if I missed it, but I now have it working, so thanks a lot for the help guys, despite my stupidity  ::)

SMF spam blocked by CleanTalk