Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Jess McD

#1
Thank you!  The video played, and my menu sprites were still displayed above the video, that's exactly what I wanted!  I experimented by playing an audio file immediately after the video started, and it played at the same time.  I'll continue experimenting with playing the audio exported from the original video files and see how close they sync up.

1 more question for you.  When the video ended it just froze on the last frame until I clicked.  Is there a way to make it go away without user input when the video ends? - Calculated video cycles then:

Code: ags
WaitMouseKey(640);

video = null;


Thanks again!  Getting the video to play over the sound was a huge step toward getting my crazy idea out of my head and onto a screen. You made my day!
#2
Thanks again for all your help!  I'll be using video in every room, so this sounds like a great solution.  I placed the code as instructed, lines 2&3 in the global script and line 6 in the global header.  I'm now getting the following error when I attempt to run the game.

Code: ags
Failed to save room room1.crm; details below
GlobalScript.ash(7): Error (line 7): expected variable or function after import, not 'D3DVideo'


Sorry for asking so many questions - this is the first time I've used a plug-in.  Getting the music to keep playing while a video plays is one the last obstacles to overcome for my little proof of concept game - then I can start developing the real thing!

Thanks again!
#3
I placed:

Code: ags
// define video
D3DVideo* video;


at the top of the global script, but I still get the undefined token error on the "video = D3D.OpenVideo ....." line of my room1 script.


Thank you for your help so far, I appreciate it.
#4
The plugin is activated.  This is just a simple room where I would like it to play the video, then open a menu with a title screen and start button.  Everything works just fine, until I try to add the video.  The plug in instructions just had the code, but not a lot of explanation, so I'm sure I just missed something

The code is below.  -Thank you!

// room script file


function room_Load()
{
gIconbar.Visible = false;
gStatusline.Visible = false;
mouse.DisableMode(eModeWalkto);
mouse.DisableMode(eModeLookat);
mouse.DisableMode(eModeInteract);
mouse.DisableMode(eModeTalkto);
mouse.DisableMode(eModeUseinv);
mouse.DisableMode(eModePickup);
mouse.DisableMode(eModeUsermode1);
mouse.DisableMode(eModeUsermode2);
mouse.EnableMode(eModePointer);
mouse.Mode = eModePointer;

// Required for autoplay
    D3D.SetLoopsPerSecond( GetGameSpeed() );
   
    // Open video file
    video = D3D.OpenVideo( "G:\AGS_RPG_POC\Renders\MMI Intro.ogv" );
   
    if ( video )
    {
        // Use room coordinates
        video.relativeTo = eD3D_RelativeToRoom;
       
        // Anchor point to top left corner
        video.SetAnchor( -0.5, -0.5 );
       
        // Play!
        video.Autoplay();
    }
    else
    {
        Display( "Couldn't open video." );
        return;

aTitleMusic.Play();
}

function Startbutton_AnyClick()
{
cEgo.ChangeRoom (2);
}

function room_Leave()
{
// Free memory when leaving the room
    video = null;
}
#5
I tried to use this plug in on my test game, but received an error "undefined token 'video'".  I was attempting to play the video clip on room load before the fade in.  Is there anything I need to do beyond copying the plug-in file to the ags directory?

I'm running AGS Build 3.5.1.19

SMF spam blocked by CleanTalk