Dodge Roll Action
Overview
Creator:
Moosh
Added: 22 Apr 2020
Tags:
Global
Downloads: 52
|
View Script
Download Example (894.77 KB) |
Information
A global script that adds a dodge roll button action, which can be used to dodge enemies, obstacles, or just move faster.
Description Setup Reviews Comments
Custom Functions:
The following functions should be modified to suit your quest's settings.
These constants are the bare essentials to get the script working without bugs.
The following functions should be modified to suit your quest's settings.
- LinkRoll_PressRoll() and LinkRoll_DisableRollInput() define which button performs the rolling action.
- LinkRoll_CheckInterrupt() tells the script when other scripts need it to interrupt it. It has a commented section for my pit script, a common interaction.
These constants are the bare essentials to get the script working without bugs.
- TIL_LINKROLL4: The first of four tile groups for the animation of Link rolling. Ordered Up, Down, Left, Right.
- AFRAMES_LINKROLL4: The number of frames in the rolling animation.
- ASPEED_LINKROLL4: The animation speed of the rolling animation.
- TIL_LINKBONK4: The first of four tiles for Link bonking off a wall. Ordered Up, Down, Left, Right.
- SFX_LINKROLL: Sound to play when Link rolls
- SFX_LINKBONK: Sound to play when Link bonks against a wall
- SPR_LINKROLL_DUST: Sprite for dust trail behind Link. 0 for none
- FREQ_LINKROLL_DUST: How frequently the dust particles are emitted
- NUM_SFX_LINKROLL: If >1, the roll sound will by randomized for that many sounds including and following SFX_LINKROLL.
- MPCOST_LINKROLL: If >0, gives the roll an MP cost
- LINKROLL_STEP: Step speed in pixels per frame for the roll
- LINKROLL_MINSTEP: Minimum step speed for the roll. (Only used if LINKROLL_VARIABLESPEED is set)
- LINKROLL_FRAMES: The number of frames the roll lasts for before decelerating
- LINKROLL_DECEL: Deceleration of the roll at the end
- LINKROLL_IFRAMES: How many frames the roll is invincible for
- LINKROLL_IFRAMES_DELAY: How many frames before the roll becomes invincible
- LINKROLL_COOLDOWN: How many frames before you can roll again
- LINKROLL_TRACKINGLENGTH: How many frames of Link movement the script tracks for acceleration based rolling. More frames makes for more precise aiming but slower turning.
- LINKROLL_BONK_STEP: Step speed when bonking off a wall
- LINKROLL_BONK_JUMP: Jump value for the wall bonk
- LINKROLL_8WAY: Determines which type of control the role uses
- 0 - 4-way: Based on Link's direction
- 1 - 8-way: Based on 8-way inputs
- 2 - 360 degree: Based on Link's movement before rolling
- LINKROLL_VARIABLESPEED: If 1, roll distance will be affected by Link's movement before rolling and clamped between LINKROLL_MINSTEP and LINKROLL_STEP.
- LINKROLL_STOPWALL: If 1, roll speed on each axis will be stopped when hitting a wall in that direction. Mostly prevents janky corner interaction.
- LINKROLL_CANBONK: If 1, Link can bonk off a wall he's directly facing when rolling




