Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: migrator on Fri 27/01/2017 17:48:46

Title: [SOLVED] Video after loading a game.
Post by: migrator on Fri 27/01/2017 17:48:46
It is possible to play a video just after loading a game?

I want to play a video summary just after the <<Continue>> option of the mainscreen. This option loads the last saved slot and shows something like <<Previously...>> and depending on the situation of the game a video is played. After this video the game continues normally.

It is possible to take the control after loading a game?

Thanks.
Title: Re: Video after loading a game.
Post by: Snarky on Fri 27/01/2017 18:28:11
Yes. Find the on_event() function in your GlobalScript, and add a condition:

Code (ags) Select
function on_event(EventType event, int data)
{
  // ... other stuff?
  if(event == eEventRestoreGame)
  {
    // TODO: Play video
  }
}
Title: Re: Video after loading a game.
Post by: migrator on Fri 27/01/2017 19:58:41
Great!!

Thanks, it works perfect!!