• 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 GameMaker Background Layer Unclear...

N

NoFontNL

Guest
I have a background layer called bg_random.
But this code:
Code:
randomize();
var lay_id = layer_get_id("bg_random");
var back_id = layer_background_get_id(lay_id);
global.backgr=choose(bg_regular,bg_dark);
layer_background_index(back_id, global.backgr);
doesn't work.
Nor does this work:
Code:
layer_hspeed(layer_background_get_id(layer_get_id("bg_random")),0);
What do I do (wrong)?
 
N

NoFontNL

Guest
Yes, I want to change the background image. I don't wanna create a new layer. And why doesn't the hspeed thing work?
 
Top