SOLVED How to change speed of background

In the room editor it is possible to set the horizontal and vertical speeds of the background layer to enable scrolling. What I would like to do is be able to adjust those speeds in code but after scouring the manual I can't find a way of doing it. There's the layer_background_speed command but that is just to set the speed of any animation the background sprite may have.
Is there a way to programmaticly* alter the H and V speed of the background?

*Is that a word?
 
layer_vspeed(layer_id, speed) and layer_hspeed(layer_id, speed)
To add on to this, I am pretty sure you need to get the layer id of your background first. At least, if I remember right. So you could do something like var bg_id = layer_get_id(“Background”); and then use that var in the quoted code.
 
Top