• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GameMaker Platformer gun not firing at certain angles when on ground (Resolved)

R

Rahiokawines

Guest
I have this problem where my bullets (Ninja Stars) will not fire when on the ground, specifically when I'm pointing to the right. I've tried changing the size of the bullets, but it showed little difference. Please help!

 
A rough guess would be that the bounding box for your "bullet" is large enough that when fired horizontally it is colliding with objects and being destroyed immediately, but that wouldn't explain why you don't have that problem when facing left.

You're going to have to post your code, and some details about how your game is organised, for anyone to figure it out. Or do a link to the game files through something like dropbox or onedrive etc.

I'd take a look but don't use GMS 2, so at least for me you'd have to export it as GMS 1 (I think - definitely had some troubles loading GMS 2 files)
 

TheouAegis

Member
Make sure the origin of your ninja star Sprite is centered. It looks to me like you have the origin set at the default (0,0), which DOES explain why it shoots left but not right.
 
Make sure the origin of your ninja star Sprite is centered. It looks to me like you have the origin set at the default (0,0), which DOES explain why it shoots left but not right.
I'm curious how that makes a difference, as it seems like there are times where they're firing at angles slightly larger than, or equal to, zero, and slightly less / equal to 180 degrees while on platforms. Your point is that the origin is maybe top left - unless they are rotating the sprite, and changing the bounding box to be longer vertically, then why does pointing to the right make a collision?

If it's at zero degrees, or larger, and is not being rotated, then doesn't it start travelling from the same height regardless of the side fired from?
 

TheouAegis

Member
He's changing image_angle of the shuriken. So when he's shooting to the right, the bbox is below the shuriken and when shooting left it's above. What else is below the shuriken? Ground.
 
R

Rahiokawines

Guest
Thanks to all that have replied, it turns out my origin point was off and the collision mask was off. Thanks!
 
Top