From version 1.8 of the OBS Lua script, you can now use relative values for the x and y co-ordinates, width and height, and rotation of objects using the position and animate commands.
- x=100
- y=300
places the object at 100 pixels from the left edge of the screen and 300 pixels down from the top.
Positioning an object with relative values;
- x=(50)
- y=(-80)
places the object 50 pixels to the right and 80 pixels up from its current position.
Just enclose values with brackets to indicate that they are relative. You can also mix absolute and relative values;
- x=(-100)
- y=250
places the object 100 pixels to the left of its current position and 250 pixels down from the top of the screen.
For width, height and rotation, just specify the w, h and r values in the same way as above.