Trying to set up an event to allow interruption of another event

GameDevMike2020

Villager
Member
Joined
Oct 23, 2020
Messages
16
Reaction score
8
First Language
English
Primarily Uses
RMMV
I have a cutscene in my game which is created purely through eventing (no videos or pictures, just in-game assets). That event has been set to auto-run, and when it completes, it moves the player to a new area. That all works fine. But it's a pain in the ass watching the whole cutscene every time I playtest a change (which is VERY frequent; I am really zealous about making sure each individual event plays out the way I want it to before moving on to the next), and it also occurred to me that players might want a way to skip it too, if they had played my game before. So I created an event set as a parallel process, with a conditional branch stating that if the cancel button was pressed, it should run the same commands as the end of the cutscene, basically fade the music and the screen and teleport the player to where they would have gone after the cutscene ended. I left the "else" branch empty.

Doesn't work. Doesn't even fake it. So can someone with more experience tell me where I went wrong, or a more efficient way to do this? Thanks for any help in advance! :D
 

zeroace074

(´∀`)
Member
Joined
Jun 4, 2020
Messages
11
Reaction score
7
First Language
English
Primarily Uses
RMMV
Hey!
The skip doesn’t work because you’re trying to run the parallel process before the cutscene has ended. So just running the conditional branch won’t do much. A more efficient way of doing this is to delete the second event and then create a Loop at the start of your cutscene event, then place your ‘If * button is pressed’ branch inside of the loop. Then, instead of running the event commands for the end of the cutscene you can create a Label (which works like a comment) just before the end of the cutscene, and placing a ‘Go to label [label name]’ command inside the conditional branch. Don’t forget to add a break loop command as well, otherwise the event will endlessly be checking if a certain button is pressed.
It should look something like:
Loop
Conditional branch [is key pressed]
Go to label ‘Skip’
Break loop
Else: (leave empty or remove)

(cutscene here)
Label: skip
(end of cutscene here)
That should get you your cutscene skip :)
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
41,269
Reaction score
14,274
First Language
English
Primarily Uses
RMMV
That will not work, as you would have to press the button at the very start of the cutscene, and if you didn't do it in time, you would still have to watch the entire cutscene. And it's very unlikely that you'll time it just right, even if you do remember that it's there.

For just yourself, you can do a conditional branch with $gameTemp.isPlaytest() in the script (to see if you're doing a play test), then ask if you want to skip the cutscene or not. Use Show Choices, and if Yes is chosen, do a Jump To Label to the end of the cutscene where to start to set up all your switches, gear, party members, etc that the cutscene needs to do, then transfer the player.

If you want it for players as well, you'll either need some global switches plugin or a NewGame+ plugin, and at the end of the cutscene turn on one of these switches. Then at the start of the cutscene, instead of $gameTemp.isPlaytest() as the condition, use this global switch or whatever. So they will have to watch it through once, without getting a choice. Once they've done that, each time they replay, that'll be asked if they want to skip it or not.

If you want something that will detect a keypress at any time in the cutscene, it'll require something different.
 

Unisoft

Villager
Member
Joined
Jan 21, 2021
Messages
27
Reaction score
6
First Language
English
Primarily Uses
RMMV
Could you run the cutscene as a parallel process? You’d need to stop player movement and if the player is a part of the cutscene then I’d make the player invisible and use another event with the player sprite to represent them, but it might work? If you haven’t done so, I’d insert a ‘wait 5’ or something into the loop to reduce the amount of processing happening. Hope that all makes sense.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,131
Reaction score
8,004
First Language
German
Primarily Uses
RMMV
if you want to interrupt a cutscene, the check for interrupting the scene needs to be inside the controlling event of the scene, it cannot be outside because the engine does not allow external control to an active event.

I would simply add a conditional branch checking for a rarely used button inside the cutscene, every few commands as needed. and if the button is pressed, exit event processing as a command (possibly with some other commands for the results of the cutscene).

just make that sequence of commands once, then select the conditional branch to copy it multiple times.
 

Unisoft

Villager
Member
Joined
Jan 21, 2021
Messages
27
Reaction score
6
First Language
English
Primarily Uses
RMMV
if you want to interrupt a cutscene, the check for interrupting the scene needs to be inside the controlling event of the scene, it cannot be outside because the engine does not allow external control to an active event.

I would simply add a conditional branch checking for a rarely used button inside the cutscene, every few commands as needed. and if the button is pressed, exit event processing as a command (possibly with some other commands for the results of the cutscene).

just make that sequence of commands once, then select the conditional branch to copy it multiple times.

Thanks for the clarification, Andar.

I still wonder whether this gives a satisfactory solution though, as you’d have to be holding the key down before/as it executes the check each time, from my (admittedly humble) understanding/experience. I suppose that it should still work reasonably if that branch is placed e.g. between every other command/line. Unless I’m talking rubbish of course!

EDIT: on balance, if the above issue does present, you could still have the conditional check for the key press as a separate parallel process, but when that check is met, use a switch to store that and then use the conditionals that Andar suggested every so often, but have them check the switch. Then, you’re not relying on the key press being done within that specific window.
 
Last edited:

GameDevMike2020

Villager
Member
Joined
Oct 23, 2020
Messages
16
Reaction score
8
First Language
English
Primarily Uses
RMMV
Thank you all for so much wonderful food for thought! I am not sure of what my final solution will be, but for the sake of simplicity, for now, I decided to just open with a choice to play/skip the cutscene. It's not necessarily elegant, and I am still striving for something that is a little less immersion-breaking on it's own, but at least this solution works and allows me to save hours during the development process.
 

Latest Threads

Latest Profile Posts

Do you like to practice level design? I do hahahaha! It's not from a specific game, it's just some tests...Fase 1.png
I really need a better indicator of where you can jump up and down though I feel... otherwise I like how this turned out for the first part of the first dungeon of the game.
@Shaz needs to make a website for his plugins. (it can be done easily for free with google sites.) I can't find a database of them anywhere!
Dion2.jpg

testing #2

Forum statistics

Threads
109,128
Messages
1,042,379
Members
141,629
Latest member
YOURBESTFRIIEND
Top