Jump to content

TempLinkState.zh

Overview
Creator: Moosh Updated: 22 May 2026 Tags: Global, Library Downloads: 115
Rating[?]: Rating: 4/5 (1 rating)
Download Script
(8.4 KB)
Information

Description Setup Reviews Comments

Combine the TempLinkState_Example global script with your own and set the following constants as needed:
  • TEMPLINKSTATE_PRIORITIZE_LENGTH: If 1, longer timers will take priority when a shorter one is set. Something that sets Link invisible for 60 frames won't overwrite something that sets it for 30 if they overlap.
  • TEMPLINKSTATE_TILE_OVERRIDE_USES_SPRITE: If 1, Link's redrawn tiles use sprites instead of script draws. Might have advantages with certain layer order stuff.
  • TEMPLINKSTATE_TILE_OVERRIDE_FLICKERS: If 1, Link's redrawn tiles will flicker when hit instead of flashing csets 9-6. Use this if you have the "Invincible Link flickers" rule enabled.
  • TEMPLINKSTATE_TILE_OVERRIDE_UNHIDE_ON_DEATH: If 1, Link will be made visible again on the frame he died if he's being redrawn. Generally preferable, but there could be reasons you want to handle this yourself.
  • TEMPLINKSTATE_TILE_OVERRIDE_DRAW_DURING_SCROLL: If 1, Link will be drawn while the screen is scrolling. Not compatible with sprite based draws.
  • TEMPLINKSTATE_BIG_LINK: 0 for normal, 1 for 1x2 Link, 2 for 2x2 Link
For scripters here's the functions you can use.

For turning off Link's collision detection:
  • TempLinkState_UnsetCollDetection(int frames=1)
For making Link invisible:
  • TempLinkState_SetInvisible(int frames=1)
For setting Link's draw offsets:
  • TempLinkState_SetDrawXOffset(int offset, int frames=1)
  • TempLinkState_SetDrawYOffset(int offset, int frames=1)
For setting Link's hit offsets:
  • TempLinkState_SetHitXOffset(int offset, int frames=1)
  • TempLinkState_SetHitYOffset(int offset, int frames=1)
For overriding Link's tile, base cset, and drawn layer:
  • TempLinkState_SetLinkTileOverride(int tile, int frames=1)
  • TempLinkState_SetLinkTileCSetOverride(int tile, int cset, int frames=1) - Removed in 2.55 version.
  • TempLinkState_SetLinkTileCSetLayerOverride(int tile, int cset, int layer, int frames=1) - Does not work if TEMPLINKSTATE_TILE_OVERRIDE_USES_SPRITE is set. Removed in 2.55 version.
For overriding Link's facing direction:
  • TempLinkState_SetDirOverride(int dir, int frames=1)
For changing Link's step speed:
  • TempLinkState_MultiplyStepSpeed(int mult)
  • TempLinkState_AddStepSpeedBoost(int amount)
For changing Link's shield flags:
  • TempLinkState_SetShieldFlagOverride(int flags, int frames=1) - Uses the TLS_SF_ flag constants.
Requires std.zh and (for the old version) scrollingDraws.zh.