How do not skip cutscenes if the game is paused? (SOLVED)

Started by JpSoft, Thu 04/06/2009 12:50:21

Previous topic - Next topic

JpSoft

I post here since i believe this is a very basic question, but i cant figure how to solve this.

Im using the eSkipEscOnly option when i configure the cut-scenes. I dont have troubles with this, and it works correctly. But if the player pauses the game during a cutscene and unpauses it pressing esc, AGS inmediately skips the scene. Or course, i tried that the player was unable to unpause the game with esc, but if esc key is pressed while the game is paused, the scene will be skipped anyway when the player finally unpauses the game, i guess because AGS still catch the keypreses while it was in pause.

Of course, i tried using  this

Code: ags
if ((keycode == 27) && (IsGamePaused())) keycode == 0;


But it do not works. Any idea? Its not a really important issue, but we all know that ESC is usually the first key we press to unpause any game (or even, any software program) and i do not want that the player could lost some important cutscenes just for a matter of bad scripting.

Jp

RickJ

#1
From my reading of the manual and your description of AGS behavior, it would appear that Start/EndCutScene mechanism process the ESC key independently of the on_key_press() event handler.  

You could script the cutscenes without the use of Start/EndCutScene() by using the non-blocking commands and the additional scripting required to make everything work to your desire.   Typically a state machine is created in the room's repeatedly execute function where each state corresponds to the initiation of an action/movement or the completion of an action or movement.

JpSoft

Well, it could be a very hard walkaround. Thanks for your suggestion.

Nice could be a function that returns if the skipable cutscenes must be skiped or not.
SkipCutScene() or something similar.

So everyone could create functions like this:
Code: ags

if ((keycode == 27) && (Game.InSkipableCutScene)) SkipCutScene;


Also, it could give a lot of new posibilites to cutscenes, for example, a new skipable value eSkipScriptOnly, where the player could customize the way to skip cutscenes, like in the way SQ3 gave the chance to skip the intro or not.  A game option like OPT_SKIPCUTSCENE_MODE could determinate if the engine must skip cutscenes inmediately or not.

Of course, if this is ever implemented, will be too late for me  ;D

Jp

Trent R

But see, it's very easy to script your own. The only thing you'd have to make sure is that you change any and all variables that would have been changed (including things like Character positions)

~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

JpSoft

Yes, thats right. I just "create" my own skiping system adding a global variable "CutScene". If this is set to 0, then the game is not in a skipable cutscene, else, then i know what i need to do.

Code: ags

if (CutScene == 0) return;
else if (CutScene == 1) {}// Change things to stay in the desired position
else...


So i just need add CutScene = xx before it starts and CutScene = 0 when is finished. Now, i can check any click or keypress before cut the scene.

Thanks for the ideas; now the interface is a lot better effective.

Jp

maraki_ang3l

And how do you cut the cutscenes if you are bored to see them?

SMF spam blocked by CleanTalk