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

GameMaker Is there a way to move the whole layer with objects?

Zabicka

Member
Hello, so I'm making a space shooter game where the player doesn't move at all, but asteroids around them do so it looks like the player is moving, I wanted to try layer_hspeed and layer_vspeed but it only works for backgrounds, so is there a way to move the whole layer with objects (Asteroids) in it?
 
You can't move the layer to move all of the instances on it, but you could use with to set the speed of all of your asteroid objects.

Example:

GML:
with (objAsteroid) {
    hspeed = 3;
    vspeed = 2;
}
 
Top