Problem 1:
End step code:
if global.dir = 0{
x = Obj_Player.x+lengthdir_x(16,image_angle)
y= Obj_Player.y+lengthdir_y(-13,image_angle)}
else{
x = Obj_Player.x+lengthdir_x(16,image_angle)
y= Obj_Player.y+lengthdir_y(-13,image_angle)}The gun's origin is at the shoulder of the arm.
This makes the gun follow the player correctly.
However, the gun is placed in the correct x position but for some reason, The y position didn't change when I wrote -13
Problem 2:
I'm not sure how to code it so that the end of the arm points towards the mouse.
This is my step code currently:
if global.dir = 0//If facing left
{
sprite_index = Spr_Arm image_index = 0 image_speed = 0//Change sprite to arm left
}
else//If facing right
{
sprite_index = Spr_Arm image_index = 1 image_speed = 0//change sprite to arm right
}











