Command to ABORT CUT SCENES badly needed

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Cyb wrote:the major problem with terminating cutscenes is that some of them (for me anyways) do a lot more than just some fancy camera work and text, as enjay said they may alter the map in some way etc etc. So then if you want to terminate it you need to write up a termination script that does all the same things that the actual script does... for complicated cutscenes it can get pretty insane and you end up with 2x the scripts you started with and most of it is repeat code

Of course there is a simple solution for this:

Instead of aborting make the 'stop' script set a flag ('skipintro')

Now in your main script put all the nonessential stuff into

Code: Select all

if (!skipintro)
{
... // do cutscene stuff here
}
This way you don't have to worry about maintaining to sets of code.
User avatar
GooberMan
Posts: 1336
Joined: Fri Aug 08, 2003 12:57 am
Location: Helsinki, Finland

Post by GooberMan »

Cyb wrote:the major problem with terminating cutscenes is that some of them (for me anyways) do a lot more than just some fancy camera work and text, as enjay said they may alter the map in some way etc etc. So then if you want to terminate it you need to write up a termination script that does all the same things that the actual script does... for complicated cutscenes it can get pretty insane and you end up with 2x the scripts you started with and most of it is repeat code
If my system works as I have in mind, it could very well counter-act those side effects. I'm getting more and more tempted to just do it now and see if it works :)
User avatar
Hirogen2
Posts: 2033
Joined: Sat Jul 19, 2003 6:15 am
Operating System Version (Optional): Tumbleweed x64
Graphics Processor: Intel with Vulkan/Metal Support
Location: Central Germany
Contact:

Post by Hirogen2 »

Cyb wrote:So then if you want to terminate it you need to write up a termination script that does all the same things that the actual script does... for complicated cutscenes it can get pretty insane and you end up with 2x the scripts you started with and most of it is repeat code

Code: Select all

int playing_scene = 0;

script 1 OPEN {
  playing_scene = 1;
  stuff
  stuff
  possibly somewhen playing_scene gets 0 due to abort
  stuff
  if(playing_scene) { move_camera...; }
  open_door;
  if(playing_scene) { move_camera...; }
}
it's a bit more typing, but that if construct is all of duplicate.
User avatar
Zell
Posts: 791
Joined: Thu Jul 24, 2003 7:47 am
Location: IN A GODDAMN BOX[In Erie.]

Post by Zell »

heh well if anyone is still curoius, i have found a way to terminate the intro. here is how i did it ( i have moving cameras and such =p

Code: Select all

{
		changecamera(0,1,1);
	setplayerproperty(prop_totallyfrozen, 0, 0);
	thing_deactivate(9);
	acs_terminate(2, 0);
}
the major problem with terminating cutscenes is that some of them (for me anyways) do a lot more than just some fancy camera work and text, as enjay said they may alter the map in some way etc etc. So then if you want to terminate it you need to write up a termination script that does all the same things that the actual script does... for complicated cutscenes it can get pretty insane and you end up with 2x the scripts you started with and most of it is repeat code
not if you have the scripts seperate in the intro, ie script 1 is the intro, script 2 is the words, script 3 is a door, then you can just stick acs_execute into the cancel intro script. =D
User avatar
GooberMan
Posts: 1336
Joined: Fri Aug 08, 2003 12:57 am
Location: Helsinki, Finland

Post by GooberMan »

Another method being used these days is calling Autosave(); once a cutscene is finished.
Cyb
Posts: 912
Joined: Tue Jul 15, 2003 5:12 pm

Post by Cyb »

yeah but if you use if(play_cutscene) or something at the beginning of the script then you can't stop it in the middle of the cutscene, you have to stop it at the beginning or not at all (come on, do you really think I hadn't thought of that :P ). I was thinking more along the lines of a key bound to something that would stop a cutscene, and actually thinking about it, I believe it could be done with a bit of playing around, off the top of my head:

1) when the cutscene starts set some variable to the script # that's running the cutscene (the cameras and all that).

2) the script that cuts off the cutscene would have to have a check for this variable (map scope) and then a couple if elses to check for that number. When it finds a match inside that if block there's all the extra stuff the cutscene does (lower floors and so on). This gets executed no matter what (at the end of the cutscene or whatever) and in this same script there's another block of if elses that checks for if the cutscene was/should be terminated and takes all the necessary actions (any stuff that needs to be synched with cameras for example) to put the map into a post-cutscene state as well as changing the view back to the player, unfreezing him, removing any hudmessages etc etc.

I pretty much made that up as I went along, so I'm sure it has a couple flaws, but nothing that couldn't be worked out I'm sure, I may have to give this a shot, not to steal your thunder or anything gooberman :P

edit: actually playing around with it right now there are many clear flaws, but I still say it's possible to make a modular cutscene terminator, though it would need a bit of work and probably a lot of bug testing
Last edited by Cyb on Wed Aug 20, 2003 5:07 pm, edited 1 time in total.
User avatar
Zell
Posts: 791
Joined: Thu Jul 24, 2003 7:47 am
Location: IN A GODDAMN BOX[In Erie.]

Post by Zell »

heh well if anyone is still curoius, i have found a way to terminate the intro. here is how i did it ( i have moving cameras and such =p
Code:

{
changecamera(0,1,1);
setplayerproperty(prop_totallyfrozen, 0, 0);
thing_deactivate(9);
acs_terminate(2, 0);
autosave();
}



the major problem with terminating cutscenes is that some of them (for me anyways) do a lot more than just some fancy camera work and text, as enjay said they may alter the map in some way etc etc. So then if you want to terminate it you need to write up a termination script that does all the same things that the actual script does... for complicated cutscenes it can get pretty insane and you end up with 2x the scripts you started with and most of it is repeat code



not if you have the scripts seperate in the intro, ie script 1 is the intro, script 2 is the words, script 3 is a door, then you can just stick acs_execute into the cancel intro script. =D
would this not work? =p
thx gooberman 4 the autosave part.
User avatar
The Ultimate DooMer
Posts: 2109
Joined: Tue Jul 15, 2003 5:29 pm
Location: Industrial Zone

Post by The Ultimate DooMer »

Well, my SSD intro is exactly 7 minutes long, but you can skip the main bit by puking a certain script, leaving a 1½ minute intro. All I did was terminate the script running (using a variable as there's 10 scripts), deactivate a couple of world ambient sounds and run the 11th script. (and remove the skip intro message)
User avatar
GooberMan
Posts: 1336
Joined: Fri Aug 08, 2003 12:57 am
Location: Helsinki, Finland

Post by GooberMan »

Cyb wrote:not to steal your thunder or anything gooberman
I was thinking of creating an event-driven scripted SDK for cutscenes. My initial experimentation showed that I couldn't do it the way I wanted to so I'm going to have to work out the best way to get around the ACS limits.
User avatar
Bio Hazard
Posts: 4019
Joined: Fri Aug 15, 2003 8:15 pm
Location: ferret ~/C/ZDL $
Contact:

Post by Bio Hazard »

all you need is:

Code: Select all

int movietics;

script 1 (void) // the script sontroller
{
	movietics = 1;
	acs_execute(2,0,0,0,0);
	*insert physical map changes here*
}

script 2 (void) // cutcsene
{
	*cameras and stuff go here*
}

script 3 (void) // terminate cutcene (special on a wall in front of the player)
{
	acs_terminate(2,0);
	movietics = 9;
}
in the physical map changes part, any numbers you would write in tics would be written like:

delay(i:"movietics" xx Y); or someting like that ive never learned how to lose those...
or
light_fade(1,128,i:"movietics" xx Y); or someting like that ive never learned how to use those...


where Y is the number of tics...


when you activate the movie termination script, it sets movietics at 0 so stuff has to do things at "warp speed" therefore making all the constructs look as if you skiped the movie...

or am i talking out my butt? im pretty sure that this would work but i havent tested it yet...
User avatar
cccp_leha
Posts: 1816
Joined: Wed Jul 16, 2003 7:21 am
Location: NJ, USA
Contact:

Post by cccp_leha »

Alternatively, you can have the player choose whether he wants to view the cutscene or not; possibly: "go down the left hallway to start with the cutscene, go down the right hallway to start withot it". Or even better, two versions of the WAD :)
User avatar
Nanami
Posts: 1066
Joined: Tue Jul 15, 2003 5:13 pm
Location: That little island pritch created.
Contact:

Post by Nanami »

At the beginning of a wad I'm working on I was going to have a switch that the player can hit to turn on/off the commentary. Something like that would be useful.
Post Reply

Return to “General”