Still one of the best simple headers I use.
Could probably do with a 2.55 version, to use some of the new features (such as reading 'Link->BigHitbox' instead of the hitbox being an argument)
Also speed boost working in water should be allowed; or at least togglable with a constant. Had to modify that for my Zora to swim faster.
Regardless, the sub-pixel movement, easy "speed boost", and the fact that it saves needing to do collision checking yourself, makes it EXTREMELY useful.
LinkMovement.zh
Overview
Creator:
Moosh
Updated: 12 Jun 2021
Tags:
Global,
Library
Downloads: 124
|
View Script
Download Script (5.02 KB) |
Information
A header for moving Link by subpixel amounts.
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.