C
CheeseWithMe
Guest
Hello! My code creates a random background when X = 0. However it only works if I am using factors of my W resolution 1280, otherwise it will not generate any background. I tried instead of _x == 0 , _x <= 0 but it didn't work.
Step Event in a obj_control:
Creation Code in the room:
Code:
global.spd = -5;
Code:
//Change Backgrounds
if (background_x[1] == 0)
{ background_index[0] = choose(bck_2,bck_1)
background_x[0] = 1280 }
else
if (background_x[0] == 0)
{ background_index[1] = choose(bck_2,bck_1)
background_x[1] = 1280 }
Code:
// Backgrounds
background_index[0] = bck_1;
background_hspeed[0] = global.spd ;
background_index[1] = choose(bck_2,bck_1)
background_hspeed[1] = global.spd ;
background_x[1] = 1280
background_y[1] = 0