How do I make a Gun in a Roguelike?

I’m making a game with a bunch of mini games, and one of the games I’d like to make is a simple infinite roguelike with a gun. Except I in fact don’t know how to make said gun work. I need it to be around the player at a short distance away, and to follow the courser accurately.

Use Galactian’s mouse orbit bundle

will that work if the camera leaves the starting position?
the other things ive tried all have that issue

@BradenS also can you send me a link to that bundle?

It sounds like “Use Game Coordinates” needs to be selected in the “Mouse Move” behavior.


This is some code I provided someone on Discord.

// Code inside the Expression
A < -90 || A > 90 && A < 270? 1 : 0

The “Flip” is set to vertical

That will rotate the gun towards the mouse and always keep the top facing up. For the part of being slightly away from the player, you’ll have to use JR’s Orbit example. But like Braden said, I believe Galactian has an example of it being used in that context

Thank you! I’ll try that and see if it works. Much appriciated!

1 Like

So now I have a new problem. When the gun flips to left, the bullets stop rotating and look. . . off. Do you have a way to fix that? Here’s the game: Flowlab Game Creator - Minis!
The Gun object is on the dirt area in the middle.