GML help with bullet direction

Hello all I am very new here so thank you in advance. I am looking for some direction in how to make a character shoot a bullet accurate to the direction they are facing.
i thought to use image_angle but cant seem to get the logic correct if someone could point me in the right direction it would be appreciated thanks.
 

woods

Member
obj_player creates obj_bullet
obj_bullet travels in the direction the obj_player is facing



i would stat with something along these lines
//pudo-code
obj_player
step event
Code:
if keyboard_check_pressed(vk_space)
{
inst = instance_create(x,y,obj_bullet)
with inst
{
direction = obj_player.direction;
speed = 1;
}
}
 
Top