Jump to content

LinkMovement.zh

Overview
Creator: Moosh Updated: 12 Jun 2021 Tags: Global, Library Downloads: 123
Rating[?]: Rating: 4.6/5 (4 ratings)
View Script Download Script
(5.02 KB)
Information

Description Setup Reviews Comments

Combine the LinkMovement_Example global script with your own. For scripters, here's some functions you can use:
  • LinkMovement_Push(int pX, int pY) - Pushes Link by an X/Y component before waitdraw.
  • LinkMovement_PushNoEdge(int pX, int pY) - Pushes Link by an X/Y component before waitdraw and allows pushing him off the screen edge.
  • LinkMovement_Push2(int pX, int pY) - Pushes Link by an X/Y component after waitdraw.
  • LinkMovement_Push2NoEdge(int pX, int pY) - Pushes Link by an X/Y component after waitdraw and allows pushing him off the screen edge.
  • LinkMovement_AddLinkSpeedBoost(float i) - Adds i to Link's current speed boost. Speed boost is reset by the global script every frame.
  • LinkMovement_SetLinkSpeedBoost(float i) - Sets Link's current speed boost to i. Speed boost is reset by the global script every frame.
  • LinkMovement_GetLinkSpeedBoost() - Returns Link's current speed boost. Because the speed boost is reset each frame, this might not be accurate depending on where you call it. Use right before LinkMovement_Update1() in the global script for the total speed boost.
  • LinkMovement_StickX() - Returns the X component of Link's input. -1 for left, 1 for right, 0 for none.
  • LinkMovement_StickY() - Returns the Y component of Link's input. -1 for up, 1 for down, 0 for none.
  • LinkMovement_UndoLinkMovement(*bool xAxis, *bool yAxis) - Cancels out all movement that happens before waitdraw for one frame. Optional arguments apply the effect to individual axes.
Requires std.zh.