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.
wchc
July 4, 2025, 1:29pm
2
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
wchc
July 4, 2025, 10:49pm
5
That’s great. Let me know if you have any specific issue with implementing something.
Have fun coding!
Making the weapon follow the rotation of the mouse
wchc
July 5, 2025, 4:23pm
8
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.
Inherits: CanvasItem< Node< Object Inherited By: AnimatedSprite2D, AudioListener2D, AudioStreamPlayer2D, BackBufferCopy, Bone2D, Camera2D, CanvasGroup, CanvasModulate, CollisionObject2D, CollisionP...
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())
kyrt4p
July 7, 2025, 12:07pm
10
What about making the weapon shoot projectiles with stats mentioned above.
Also i would need something for enemy spawning + enemy and player health
wchc
July 7, 2025, 12:53pm
11
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:
In this step-by-step tutorial series, you will create your first complete 2D game with Godot. By the end of the series, you will have a simple yet complete game of your own, like the image below. i...
kyrt4p
July 7, 2025, 1:35pm
12
That was the video i was talking about.
chess battle advanced
kyrt4p
July 7, 2025, 2:14pm
13
I was thinking that the link was the video by gd quest