Shouldn't it be 'song_data = data_button.song_data' then (instead of the inverse 'data_button.song_data = song_data')?
Shouldn't it be 'song_data = data_button.song_data' then (instead of the inverse 'data_button.song_data = song_data')?
Hope that was comprehensible enough to help you!
Hope that was comprehensible enough to help you!
6) At the end of the attack animation, the AnimationPlayer calls a function that acts depending on the stored input variable. (like dealing a different amount of damage or extending/interrupting the attack)
6) At the end of the attack animation, the AnimationPlayer calls a function that acts depending on the stored input variable. (like dealing a different amount of damage or extending/interrupting the attack)
So this should be like: when jump attack button pressed -> if current timing state isn't "inactive" -> if input storage ...
So this should be like: when jump attack button pressed -> if current timing state isn't "inactive" -> if input storage ...
4) Define a variable that will store the input timing. (maybe using the same enum?)
5) During the attack, handle inputs depending on the current timing state ...
4) Define a variable that will store the input timing. (maybe using the same enum?)
5) During the attack, handle inputs depending on the current timing state ...
1) Define an enum for the different timing states. (like "inactive" (for ignoring inputs), "too early", "perfect" etc.)
2) Define a variable of that enum for the current state.
3) During the attack, change that variable ...
1) Define an enum for the different timing states. (like "inactive" (for ignoring inputs), "too early", "perfect" etc.)
2) Define a variable of that enum for the current state.
3) During the attack, change that variable ...
The logic should be:
- scene has a Health node
- hurtbox script has a var health
- this var health is set in the inspector to link to the Health node
- that Health node has a script which defines another var health
The logic should be:
- scene has a Health node
- hurtbox script has a var health
- this var health is set in the inspector to link to the Health node
- that Health node has a script which defines another var health
Though I'd recommend moving it into another function: Change line 10 to
"func _unhandled_input(event: InputEvent) -> void:"
and replace "Input.is_action_pressed" with "event.is_action_pressed".
Though I'd recommend moving it into another function: Change line 10 to
"func _unhandled_input(event: InputEvent) -> void:"
and replace "Input.is_action_pressed" with "event.is_action_pressed".