point of origin

RODO

Member
Hello guys, I was fixing some visual things in my game, to make it more attractive and make your gameplay cool. While fixing bugs and fixing a sprite, I noticed that one of my objects (a "gun" specifically) was creating the "bullets" at the point of origin. Follow the image below:

1609578294159.png


this point in the middle is its point of origin, but I would like it not to create the bullets at that point, but at the right end of this "magic scepter". Is there any command or way to change this? like, make your creation change and be based on where you set it on the sprite and not on your point of origin. Thanks for any attention and help
 

TsukaYuriko

🌠
Forum Staff
Moderator
Drag the origin crosshair to where you want them to be created.

Alternatively, if you need the sprite's origin to stay where it is, use the lengthdir functions to offset the position the bullets are spawned at.
 

RODO

Member
Drag the origin crosshair to where you want them to be created.

Alternatively, if you need the sprite's origin to stay where it is, use the lengthdir functions to offset the position the bullets are spawned at.
Amazingly, my gun changes the angle and you can aim. But I am going to test some of the means you gave me, at least in lengthdir. Thank you for your help


Or if the gun never changes angles, just add 8 to x inside instance_create_layer(). Some people still don't know that's something you can do with instance_create* functions. 😄

I did it and the shot comes out pretty crooked kkk, but funny the people didn’t know it (without wanting to offend), it was one of the first things I ended up messing with to test, anyway. Thank you very much for your attention
 
Top