#Turret (fixed)
20 messages · Page 1 of 1 (latest)
what awai(get_tree()) do ?
await(get_tree(), "idle_frame")
seems to be some sort of pausing mechanism to skip a frame, but the debugger gives me an error if I add it in.
try removing it, i suspect it waits for somthing that never came
Still nothing.
it looks fine to me. maybe you forgot to add the player group to the player node?
You were correct, however, I am now getting an error: "Nonexistant function 'iscolliding' in base 'RayCast2D".
it should be is_colliding
does the godot editor not recognize valid methods? you might want to switch to a proper IDE like visual studio code to avoid issues like that in the future
oh wait, that's C#. not sure if gdscript works with visual studio code. hopefully?
nevermind. might just be a gdscript thing. ignore me.
Alright. Thanks for the help.
Turret (fixed)
Turret (still in need of help)
Once again I've run into a problem that I cannot solve.
Doesn't acknowledge that the bullet has the method "destroy" even though it clearly does.
- see if the player is actually receiving bodies by adding a print() right after the function
- is the method in a node that can have a body? like an area2d, rigidbody, etc
also if youre trying to get the bullet to delete itself when it touches the player, put body.destroy() in the _on_player_hitbox_body_entered(body) function
I gotta start paying more attention before I ask questions 🤦♂️ . I mean't to call my bullet in the "_on_player_hitbox_area_entered" function instead of the "_on_player_hitbox_body_entered" function