Godot shooting weapon for a rougelike

Godot Version

4 or higher

Question

im trying to create a weapon for a rougelike.
I want it to be something similar to the starting gun from Enter The Gungeon. It also needs stats,
which are:

Bullet amount
Spread
Damage
Fire rate
Bullet size

Any help would be apprieciated.

What have you tried so far?
Is there any particular issue you have with implementing this weapon?

I don’t know how to do it, but i coded 8 direcional
movement.

And found a video explaining it

That’s great. Let me know if you have any specific issue with implementing something.
Have fun coding!

Thank you!:grinning_face:

Making the weapon follow the rotation of the mouse

There is a get_global_mouse_position() method in the CanvasItem class (that Node2D class extends) that you can use to find the mouse position.

And a look_at() method in the Node2D that allows you to rotate objects so they face a specific point.

Combine these two and you’ll have a working rotating weapon that looks at your mouse.

func _process(_delta: float) -> void:
	look_at(get_global_mouse_position())

What about making the weapon shoot projectiles with stats mentioned above.
Also i would need something for enemy spawning + enemy and player health

I think you’re better off taking a step back and going through a tutorial to learn some basics. Here’s a good one you can check out that teaches the basics:

That was the video i was talking about.
chess battle advanced

I was thinking that the link was the video by gd quest