M
Mr_koozit
Guest
Im trying to make my character shoot in a straight line but i cant
make make the bullets rotate when the player is rotating too:
---------------------------------------------------------------------------------------------------------------------------------------------------
firingdelay = 0
---------------------------------------------------------------------------------------------------------------------------------------------------
x = player.x+5;
y = player.y+46;
firingdelay = firingdelay -1;
if (mouse_check_button(mb_left)) && (firingdelay < 0)
{
firingdelay = 5;
with (instance_create_layer(x,y,"Bullets",bullet))
{
speed = 25;
direction = other.image_angle;
image_angle = direction;
}
}
make make the bullets rotate when the player is rotating too:
---------------------------------------------------------------------------------------------------------------------------------------------------
firingdelay = 0
---------------------------------------------------------------------------------------------------------------------------------------------------
x = player.x+5;
y = player.y+46;
firingdelay = firingdelay -1;
if (mouse_check_button(mb_left)) && (firingdelay < 0)
{
firingdelay = 5;
with (instance_create_layer(x,y,"Bullets",bullet))
{
speed = 25;
direction = other.image_angle;
image_angle = direction;
}
}
Attachments
-
147.3 KB Views: 8
-
147.3 KB Views: 7