MateuSai / Godot-Roguelike-Tutorial

A series of videos on how to make a roguelike using the Godot game engine: https://www.youtube.com/playlist?list=PL2-ArCpIQtjELkyLKec8BaVVCeunuHSK9
139 stars 34 forks source link

HITBOX TIMER #5

Open codename-12 opened 1 year ago

codename-12 commented 1 year ago

i've opened in godot 4.1 and im try debuging and found this error on hitbox code so player cannot hit by bat before he hit twice by bat

E 0:01:12:0201 Hitbox.gd:27 @ _on_body_entered(): Timer was not added to the SceneTree. Either add it or set autostart to true. <C++ Error> Condition "!is_inside_tree()" is true. <C++ Source> scene/main/timer.cpp:109 @ start()

Hitbox.gd:27 @ _on_body_entered()
Oreofreakshake commented 1 year ago

I think instead of the timer.start() you can add timer.autostart = true instead that should fix the issue