• 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 problem with background layer tile code

R

RichJ

Guest
I am able to make a background layer in code with a sprite but it doesn't tile in the game when I put the code in after creating the layer. It appears at the depth it's supposed to and I don't get any errors for when I run the game, it just doesn't show up tiled. I have it in the create event of a background manager object.

This is what I have, I won't bore you with the whole array list, the first use corresponds to a layer depth the second to a sprite.

layerid_7_1=layer_create(bg_1[6,2])
layer_background_create(layerid_7_1,bg_1[6,0])
bgid_7_1=layer_background_get_id(layerid_7_1)
layer_background_htiled(bgid_7_1,true)
layer_background_vtiled(bgid_7_1,true)
layer_background_speed(bgid_7_1,-.5)

From what I've read in the manual this should work but it the tiling effect isn't there. Can someone let me know what I'm doing wrong here?

Thank you.
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Your code looks good, so it might be a bug... If you can create a small project that only has this code and a background and it still does it then it's a bug and you should file it with YYG along with a link to the test project.
 
Top