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.
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.