Jump to content

Photo

Disabling items during a cutscene


  • Please log in to reply
7 replies to this topic

#1 Twilight Knight

Twilight Knight

    Tell all with glee, Argon's on PureZC

  • Members
  • Real Name:Sven
  • Location:Rotterdam, NL

Posted 11 December 2020 - 04:59 AM

Hey all

One thing which has always bothered me about cutscenes is that Link can slash his sword, or worse, drop a super bomb during a cutscene.

 

What would be the recommended away to prevent this?

 

I know it's possible to disable items on certain Dmaps, but that changes the item the player has selected when those items are enabled again.

 

Then there is also the possibility to freeze Link and enemies with the Screen Freeze (Except FFCs) combo type. But if that is enabled, the string won't play.

 

I can think of a way to make that work. Have a ffc script Waitframes() for a couple of frames, enough to let the string play, and then freeze the screen long enough for the timed warp to kick in. It should work since I have the "Messages Freeze All Action" quest option enabled.
 

 

But I was wondering: do you guys have any suggestions regarding this matter?


Edited by Twilight Knight, 11 December 2020 - 04:59 AM.

  • Lightwulf and Bagu like this

#2 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 11 December 2020 - 05:19 AM

With a script, `Link->SwordJinx` and `Link->ItemJinx` - or just directly prevent the keypresses every frame.


  • Twilight Knight, Lightwulf and Bagu like this

#3 Deedee

Deedee

    Bug Frog Dragon Girl

  • Moderators
  • Real Name:Deedee
  • Pronouns:She / Her, They / Them
  • Location:Canada

Posted 11 December 2020 - 06:14 AM

NoAction(); every frame, from std.zh, or WaitNoAction(); which combined NoAction with a Waitframe.


  • Twilight Knight likes this

#4 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

Posted 11 December 2020 - 06:43 AM

https://www.purezc.n...=scripts&id=261


  • Twilight Knight and Lightwulf like this

#5 Twilight Knight

Twilight Knight

    Tell all with glee, Argon's on PureZC

  • Members
  • Real Name:Sven
  • Location:Rotterdam, NL

Posted 11 December 2020 - 07:53 AM

Awesome, thank you everyone!

That script of yours should do the trick Avaro, thank you!


  • Avaro and Lightwulf like this

#6 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 17 December 2020 - 09:15 AM

Oh lordy... 
 
There are a lot of ways to disable the change of the selected item. To be frank, if you absolutely want to disable a lot of stuff, you can use Game->Suspend[] to halt execution of game code, instead of doing these obtuse things, if you are on 2.55. 
 

screen script suspendstuff
{
	void run()
	{
		Game->Suspend[susptLWEAPONS] = true;
		Game->Suspend[susptLINK] = true;
		Game->Suspend[susptCOLLISIONS] = true;
		for ( int q = susptNPCSCRIPTS; q < susptFFCSCRIPTS; ++q )
		{
			Game->Suspend[q] = true;
		}
	}
}

screen script un_suspendstuff
{
	void run()
	{
		Game->Suspend[susptLWEAPONS] = false;
		Game->Suspend[susptLINK] = false;
		Game->Suspend[susptCOLLISIONS] = false;
		for ( int q = susptNPCSCRIPTS; q < susptFFCSCRIPTS; ++q )
		{
			Game->Suspend[q] = false;
		}
	}
}

Put the first on the screen with the cut-scene, add or remove entries as needed from the suspend types enum (std_constants, line 2900 in <std> v1.7109), and restore those engine sections on the screen visited after the cutscene. These literally turn off components of the engine, and you can suspend other things such as combo scripts, conveyors and other elements that interfere with your cut-scene. 


  • Twilight Knight and Lightwulf like this

#7 Twilight Knight

Twilight Knight

    Tell all with glee, Argon's on PureZC

  • Members
  • Real Name:Sven
  • Location:Rotterdam, NL

Posted 17 December 2020 - 11:34 AM

Thank you Zoria, I didn't even know those kind of things were possible now!


  • Lightwulf likes this

#8 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 18 December 2020 - 08:11 PM

One problem, @Zoria; 'susptLink' being on prevents warps from working.


  • Lightwulf likes this


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users