• 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!

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