D
DanT
Guest
IDE v2.2.0.343 Runtime v2.2.0.261
Windows 10 VM output
I am trying to get a background to move in the current room, the room has a single instance layer with an object.
According to the manual http://docs2.yoyogames.com/source/_...l_reference/rooms/sprites/layer_sprite_x.html I have the following code in my object:
I've tried the code in both the step and the draw events, the background does not move and the debug message continually prints out "bgX = 0".
Am I doing something incorrectly or does this function have a bug?
Windows 10 VM output
I am trying to get a background to move in the current room, the room has a single instance layer with an object.
According to the manual http://docs2.yoyogames.com/source/_...l_reference/rooms/sprites/layer_sprite_x.html I have the following code in my object:
Code:
// create
backgroundLayer = layer_create(100, "Background");
backgroundSprite = choose(sprBgA, sprBgB, sprBgC);
backgroundElement = layer_background_create(backgroundLayer, backgroundSprite);
// step or draw
var bgX = layer_sprite_get_x(backgroundElement);
layer_sprite_x(backgroundElement, bgX + 1);
show_debug_message("bgX = " + string(layer_sprite_get_x(backgroundElement)));
Am I doing something incorrectly or does this function have a bug?