I am very new to game development, and I am using GameMaker Studio as my first engine. I was following along with a tutorial to create an Asteroids-like game from scratch, but right now I am trying to create my own coding. There are small problems, but I believe it may just be my coding. The coding language is GML, its proprietary language.
The first problem is that I cannot get my sprite to stop moving backwards:
motion_add(image_angle,-0.2);
if (speed < 0) speed = 0;
It seems okay, since I am trying to force the sprite to have a motion of zero if the speed starts going negative.
Another thing is that I cannot seem to get the bullets to fire from my ship. The code is under the event "Press <Space>":
bullet = instance_create(x,y,obj_bullet);
bullet.speed = 15;
bullet.direction = image_angle;
The bullet literally just doesn't appear, at all. I know it isn't invisible because firing at an asteroid will not destroy the asteroid.
Thanks for the help everyone!