player = object_new('obj_player')
Press the Stop/Play button to apply your changes to the code.
sprite = sprite_new('spr_player')
Now press Stop/Play again and check out your new spaceship!
player.x = 100
Press Stop/Play and see what happens!
player.x = -100
Now it should move to the left. Again, see if you can make your spaceship touch the left edge of the screen without going too far.
player.y = 100
See how it moves up? Try changing the number until you reach the top edge of the screen. And finally, just like before, change it to a negative number and try to touch the bottom edge of the screen.
asteroid = object_new('obj_asteroid')
Just like before it’s only a blue block that says "empty image". Remember how we fixed that last time? We added a sprite onto the object!
sprite = sprite_new('spr_asteroid')
asteroid.x = 100
asteroid.y = 100
Change the numbers around to whatever you want to put it somewhere in the game.
Ready for more? Try the next lesson!