Y
yarala
Guest
i am game maker 1 user
creating platform 2d game this is code to gun follow character and should be point on character
but it spawns in wall obj
x = spr_character.x
y = spr_character.y+10
image_angle = point_direction(x,y,mouse_x,mouse_y)
firingdelay = firingdelay - 1
if (mouse_check_button(mb_left)) && (firingdelay < 0)
{
firingdelay = 5
with (instance_create(x,y,oBullet))
{
speed = 25
direction = other.image_angle
image_angle = direction
}
}
creating platform 2d game this is code to gun follow character and should be point on character
but it spawns in wall obj
x = spr_character.x
y = spr_character.y+10
image_angle = point_direction(x,y,mouse_x,mouse_y)
firingdelay = firingdelay - 1
if (mouse_check_button(mb_left)) && (firingdelay < 0)
{
firingdelay = 5
with (instance_create(x,y,oBullet))
{
speed = 25
direction = other.image_angle
image_angle = direction
}
}