Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: aussie on Sun 24/07/2005 21:31:03

Title: Skippable cutscenes [SOLVED]
Post by: aussie on Sun 24/07/2005 21:31:03
Just a question, I guess it's pretty basic but I'm useless at programming.

I have an intro scene, which I'd like to take place every time the game is started, and which leads to the title screen. However, I suppose that can get a bit annoying or people who have already played the game before.

How do I do it so that by pressing ESC I get over the scene?

Cheers.

BTW, I'm not using the OO AGS version, I'm using the previous one.
Title: Re: Skippable cutscenes
Post by: DoorKnobHandle on Sun 24/07/2005 21:34:50
Simply look the "StartCutscene ( int type )" and "EndCutscene ( )" functions up in the manual...

If you have any trouble understanding the definitions and explanations in the manual then come back and ask again...
Title: Re: Skippable cutscenes
Post by: Ishmael on Sun 24/07/2005 21:35:36
Put StartCutscene(num); where you want the skipableness to start, and check the manual for which number to put as the parameter to make it skipable with ESC, I think it was 1 but I'm not sure. And put EndCutscene(); where you want the game to skip to when ESC is pressed.
Title: Re: Skippable cutscenes
Post by: aussie on Sun 24/07/2005 21:39:07
Got it. Thanks a lot.

Silly me, stupid question.
Title: Re: Skippable cutscenes
Post by: Play_Pretend on Mon 25/07/2005 07:23:13
Honestly, despite a strong programming background, the StartCutscene and EndCutscene commands were confusing me, too.  I would put StartCutscene(whatever integer here), then include the script for the cutscene in the middle, and put EndCutscene() at the end.  And I set it for any key, any click to skip.  But everytime I ran it, it would leap straight on to the script after the End command to move the (hidden) player on to the next room, the games' starting room.

I eventually had to revert to just timing out how long my cutscene was, and using the WaitMouseKey command so that it would wait just long enough for the scene to run, then stop waiting and move on to the next room.  Or the player could click, type, whatever to jump ahead.  It seems to work the same as the Cutscene commands are supposed to, I don't know why I couldn't get them to work in the first place.  Any thoughts?
Title: Re: Skippable cutscenes
Post by: Gregjazz on Tue 26/07/2005 03:46:53
Quote from: Heromaker on Mon 25/07/2005 07:23:13
Honestly, despite a strong programming background, the StartCutscene and EndCutscene commands were confusing me, too.  I would put StartCutscene(whatever integer here), then include the script for the cutscene in the middle, and put EndCutscene() at the end.  And I set it for any key, any click to skip.  But everytime I ran it, it would leap straight on to the script after the End command to move the (hidden) player on to the next room, the games' starting room.

I eventually had to revert to just timing out how long my cutscene was, and using the WaitMouseKey command so that it would wait just long enough for the scene to run, then stop waiting and move on to the next room.  Or the player could click, type, whatever to jump ahead.  It seems to work the same as the Cutscene commands are supposed to, I don't know why I couldn't get them to work in the first place.  Any thoughts?

You mentioned you set it to "any key, any mouse click." That means if you click the mouse to skip text, it will skip the cutscene also. I recommend using the "ESC only" cutscene method. It's pretty standard for adventure games. Try that, I think that will fix your problems. Err.. the problems you're experiencing with AGS, that is. :)
Title: Re: Skippable cutscenes
Post by: Play_Pretend on Tue 26/07/2005 10:50:42
Thanks, but I'm afraid I didn't clarify enough. . .I meant, without even clicking the mouse or touching a key, the intro screen would fade in, and the instant it finished the fadein, it would immediately start fading out again, skipping my script in between.  I never did a thing.  I don't know if it makes a difference, but I was trying to start the cutscene, just have a simple object move around the screen (as part of my logo), and then end the cutscene and go on.  The object would be on the screen, but wouldn't move because the screen immediately started fading out again.
Title: Re: Skippable cutscenes
Post by: Ishmael on Tue 26/07/2005 16:26:35
Are the object moving commands blocking?
Title: Re: Skippable cutscenes
Post by: Play_Pretend on Wed 27/07/2005 04:58:16
Doh. . .you know, now that I think about it, I'm pretty sure I specified NoBlock.  Would that cause it to just jump ahead in the script like that?  I assumed Blocking it would prevent the player from being able to click/button skip ahead of the cutscene.  Was I wrong?
Title: Re: Skippable cutscenes [SOLVED]
Post by: Ishmael on Wed 27/07/2005 11:36:23
Yes.

If set to blocking, it just simply means that the engine will execute that command and wait untill it's done before executing the next.