Jump to content

Photo

Pause Enemies Script


  • Please log in to reply
10 replies to this topic

#1 Korben

Korben

    Junior

  • Members
  • Location:USA

Posted 28 February 2019 - 07:38 PM

Would someone mind making a script that pauses all enemy action on a screen? It would be used for situations where Link isn't movable on screen (using a script) during a short cutscene. Right now I have it set up so that the enemies simply disappear during the cutscene and then reappear afterwards, but that looks kind of strange.

 

Edit: I suppose I should mention that the point of this script is so that enemies don't damage Link during a cutscene while he is frozen.


Edited by Korben, 01 March 2019 - 01:48 PM.


#2 P-Tux7

P-Tux7

    💛

  • Members

Posted 01 March 2019 - 12:04 AM

This script could just apply the clock effect to Link. Ask Zaxarone about it, I know he made a scripted item that could give you a clock when you used it so surely he can do it upon entering a screen with a special FFC.


  • Korben likes this

#3 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 01 March 2019 - 04:33 AM

Would someone mind making a script that freezes all enemy action on a screen? It would be used for situations where Link is frozen on screen (using a script) during a short cutscene. Right now I have it set up so that the enemies simply disappear during the cutscene and then reappear afterwards, but that looks kind of strange.
 
Edit: I suppose I should mention that the point of this script is so that enemies don't damage Link during a cutscene while he is frozen.


You would need to define how the cutscene begins and ends, how it is controlled, and so forth. The Freeze All (Except FFCs) combo type would freeze all action other than a cutscene script, but there is no single-pirpose solution script for this.

If you are warping Link around for your cutscene, you may be able to get by with placing a combo of this type on your screens.

See stdExtra.zh, too.
  • Korben likes this

#4 Korben

Korben

    Junior

  • Members
  • Location:USA

Posted 01 March 2019 - 11:06 AM

You would need to define how the cutscene begins and ends, how it is controlled, and so forth. The Freeze All (Except FFCs) combo type would freeze all action other than a cutscene script, but there is no single-pirpose solution script for this.

If you are warping Link around for your cutscene, you may be able to get by with placing a combo of this type on your screens.

See stdExtra.zh, too.

 

So the cutscene begins by activating the secret flags on a screen which puts a tile warp under Link, then he is warped to a series of nearly identical rooms that use this script 

ffc script dontMove{
    void run(int dir){
        while(true){
            Link->Dir = dir;
            WaitNoAction();
        }
    }
}

which also allows me to face Link in a specific direction. Then I use a combination of freeform combos, combo cycling, and manual screen by screen animation to make the cutscene. I didn't know about the freeze all combo type (in hindsight I should have asked about this in ZQuest Editor Help first). I thought this would work but it also freezes my timed warps, which I need to progress the cutscene. 


Edited by Korben, 01 March 2019 - 11:07 AM.


#5 P-Tux7

P-Tux7

    💛

  • Members

Posted 01 March 2019 - 12:19 PM

You should probably rename this to ""Pause Enemies Script" because the title makes it look like you want an ice-making item for Link.


  • Korben likes this

#6 Korben

Korben

    Junior

  • Members
  • Location:USA

Posted 01 March 2019 - 01:04 PM

You should probably rename this to ""Pause Enemies Script" because the title makes it look like you want an ice-making item for Link.

That's true. How do I change it? 



#7 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 01 March 2019 - 01:07 PM

Should be able to just edit the first post?


  • Korben likes this

#8 Korben

Korben

    Junior

  • Members
  • Location:USA

Posted 01 March 2019 - 01:19 PM

Should be able to just edit the first post?

Oh thanks, I didn't realize I had to click use full editor.



#9 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 01 March 2019 - 03:39 PM

You can have that ffc script set Link->CollDetection = false; then have an ffc on the post cutscene screen set it back to Link->CollDetection = true;.
 
You probably shouldn't have real enemies on screens used for 2.10 stye cutscenes.
 
The other option, is for your script to do this:
 
ffc script dontMove{
	void run(int dir){
		while(true){
			Link->Dir = dir;
			for (int q = Screen->NumNPCs(); q > 0; --q )
			{
				npc n = Screen->LoadNPC(q);
				n->Stun = 10;
			}

			for (int q = Screen->NumEWeapons(); q > 0; --q )
			{ //remove their weapons so that they also do not hit Link
				eweapon e = Screen->LoadEWeapon(q);
				Remove(e);
			}
			
			WaitNoAction();
		}
	}
}

  • Korben likes this

#10 Korben

Korben

    Junior

  • Members
  • Location:USA

Posted 01 March 2019 - 04:21 PM

Thanks Zoria, that's exactly what I needed.



#11 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 02 March 2019 - 12:21 AM

Enjoy. Note that I do not know if this will work on all ghosted enemies in your quest (if any).
  • Korben likes this


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users