Jump to content

Cutscene Trigger

Overview
Creator: Moosh Added: 15 May 2018 Tags: FFC Downloads: 58
Rating[?]: Rating: 4.6/5 (4 ratings)
View Script Download Example
(869.84 KB)
Information

Description Setup Reviews Comments

First, set D_CUTSCENETRIGGER to a Screen->D that's not being used by other scripts, at least not global or commonly used ones. If you have no scripts using Screen->D you can leave it at 0.

Place your FFC with the CutsceneTrigger script where you want your cutscene trigger to be. The position of the FFC represents the top-left corner of the trigger hitbox.

Set the FFC's D0-7 arguments as follows:
  • D0: Which DMap to warp to for the cutscene
  • D1: Which screen to warp to for the cutscene. Please Note: Give your screen number in decimal. ZQuest numbers screens in hexadecimal, but the FFC editor only accepts decimal, so you've gotta convert.
  • D2: The width of the trigger hitbox in pixels
  • D3: The height of the trigger hitbox in pixels
  • D4: Set to a number 1-17 to make the cutscene only play once. Once Link is warped off the screen, that numbered cutscene is flagged as having played. If set to 0, the cutscene will always play.
  • D5: If this is positive, the trigger will check for that number flag under Link. If negative, it will check if Link has that item ID. If 0, Link can always trigger the cutscene.
    • If it's positive and you add 1000 to the flag, it will trigger when that flag is on the screen (on layer 0) at all, rather than just under Link
    • If it's negative and you subtract 1000 from the item ID, it will trigger if Link doesn't have that item ID
  • D6: The X position Link will walk to before warping. If D6 and D7 are both 0, Link is warped immediately.
  • D7: The Y position Link will walk to before warping.
  • A. Delay: Setting the FFC's A. Delay to >0 will allow the script to trigger even if you enter the screen on top of its hitbox, without needing to walk off first.
Some extra tips:
  • You'll probably want to set the constant CUTSCENETRIGGER_SHOW_HITBOXES to 1 while testing the triggers, to be sure you got the size and position of the hitbox right.
  • Argument D5 can be used to disable cutscenes with secrets the same as it can be used to enable them.
  • If your cutscene gives out an item or some other form of critical progress, you should either give them out at the very beginning of the cutscene or use some way besides argument D4 to disable it. Cutscenes using argument D4 are flagged as viewed as soon as Link warps, meaning they can be skipped with F6.
  • To prevent infinite loops, cutscenes won't trigger if Link enters the screen directly on top of them. Offset edge of screen triggers in a bit so Link doesn't harmlessly walk over them, or use A. Delay to disable this behavior.
  • You can have triggers for the same cutscene overlapping or adjacent to each other to make unusual trigger regions. I'd avoid doing this for two different cutscenes, though.
Requires std.zh.