Topic was automatically imported from the old Question2Answer platform.
Asked By
IC_Central
I can’t find a tutorial or forum on how to make a bullet for godot 4. I haven’t used godot in a while so I’m still trying to get used to the new ways of doing things.
You will have to make a Bullet scene, maybe give it a Facing variable, then depending on that variable it flips its direction. It moves and slides in that direction. It gueuefrees when it hits anything. If an enemy detects its been hit it makes its health go down. Load it as a preaload in the player script. .instantiate it. Change its Facing and X and Y with instance.x instance.y instance.facing (which whould need to be denoted with @export so it can be changed.) Do get_tree().add_child(instance) or something like that to add it to the scene.
Edit: Sorry about the typo’s but I gtg
thanks so much
IC_Central | 2023-03-28 00:12
If it’s useful, could you set it as the Correct Answer for people searching the same question?