Umm idont have idea where to ask (HELP)

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
}
}
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
the issue might be that you are using spr_character instead of obj_character (or whatever you have it named), which tries to look up an object using the sprite's ID (with mixed results)
 
Top