-
Notifications
You must be signed in to change notification settings - Fork 7
Beat Nodes
this-is-bennyk edited this page Jul 16, 2022
·
7 revisions
Beat nodes are any node that inherit from BeatNode.gd
or its derived classes.
They automatically respond to the Conductor by performing an animation on a given interval of quarter notes when a song is playing.
They also automatically scale their animation speed when the speed of the song is increased in Freeplay.
It has the following properties:
-
anim_player_path
: NodePath to the animation player to use for the idle animation. Assumes the animation player is a child of the node by default. -
idle_anim_name
: Name of the animation to play every interval. By default, assumes an animation calledIdle
.
Note: inheriting classes may ignore this property if they plan to use more than 1 animation for the idle. -
idle_frequency
: The interval of quarter notes to play the animation on.
Ex. 1 is every beat, 2 is every 2 beats, etc. A value of 0 means to stop animating to the beat of the music. Cannot be less than 0. -
idle_offset
: The offset in quarter notes to shift the interval. No offset by default.
Ex. A frequency of 2 and an offset of 1 means the beat node animates on every odd beat.
-
Double Idle Beat Node: a beat node inheriting from
DoubleIdleBeatNode.gd
. Has 2 idle animations it switches between every interval.-
first_idle
: The first idle animation, typically one where the animated thing appears as if it's moving from the left. -
second_idle
: The second idle animation, typically one where the animated thing appears as if it's moving from the right. -
starts_on_left
: Whether or not to start with the first or second animation (slight misnomer).
-
- BPM Scaled Beat Node: a beat node that scales depending on how fast the song currently is.
Characters are any object inheriting from Character.gd
or its derived classes. Any character can be a potential performer.
For 2D characters, they can be flipped by setting the x-value in their scale property to -1 (or at least negative).
It has the following properties:
-
direction_anims
: The names of the animations that are played depending on the direction of the note. -
anim_pairs_if_flipped
: The names of animations that are reversed when the character is facing the opposite direction. Useful for characters that can be both players and opponents.
Note: if you see this not working when you playtest, close the scene with the flipped character, reopen it, and check to see if the character has automatically been rotated to -180 with its y-value of the scale property set to -1 instead of the x. Idk why Godot does this automatically, but if you set it back to a rotation of 0 with a scale of(-1, 1)
, it will work and stay working permanently. -
camera_follow_point_path
: The Position node that the camera lerps to when following a character. -
icon
: A HealthIcon scene for the level to use. MUST be a node that inherits fromHealthIcon.gd
(or at least be compatible with your HUD).