OpenBVE
OpenBVE copied to clipboard
[Suggestion] Multi position object for .animated files
Description
as the title said.
The current method to write multiple animated object in .animated is like this:
[object]
states = chair.obj
position = -0.6,0.1,-4
RotateYDirection = 0, 1, 0
RotateYFunction = some formula
[object]
states = chair.obj
position = -0.6,0.1,-2
RotateYDirection = 0, 1, 0
RotateYFunction = some formula
[object]
states = chair.obj
position = -0.6,0.1,0
RotateYDirection = 0, 1, 0
[object]
states = chair.obj
position = -0.6,0.1,2
RotateYDirection = 0, 1, 0
RotateYFunction = some formula
[object]
states = chair.obj
position = -0.6,0.1,4
RotateYDirection = 0, 1, 0
RotateYFunction = some formula
[object]
states = chair.obj
position = 0.6,0.1,4
RotateYDirection = 0, 1, 0
[object]
states = chair.obj
position = 0.6,0.1,2
RotateYDirection = 0, 1, 0
RotateYFunction = some formula
[object]
states = chair.obj
position = 0.6,0.1,0
RotateYDirection = 0, 1, 0
RotateYFunction = some formula
[object]
states = chair.obj
position = 0.6,0.1,-2
RotateYDirection = 0, 1, 0
RotateYFunction = some formula
[object]
states = chair.obj
position = 0.6,0.1,-4
RotateYDirection = 0, 1, 0
RotateYFunction = some formula
The only difference in this code just every object is in different position.
So i propose a new way to simplify the code to be like this:
[object]
states = chair.obj
RotateYDirection = 0, 1, 0
RotateYFunction = some formula
position = -0.6,0.1,-4
position = -0.6,0.1,-2
position = -0.6,0.1,0
and so on....
or like this, add a separator if the addon creator prefer to use one line.
[object]
states = chair.obj
RotateYDirection = 0, 1, 0
RotateYFunction = some formula
position = -0.6,0.1,-4 & -0.6,0.1,-2 & -0.6,0.1,0 and so on....
or use it in [include] section for static object to be like this.
[include]
chair.obj
position = -0.6,0.1,-4
position = -0.6,0.1,-2
position = -0.6,0.1,0
and so on....
[include]
chair.obj
position = -0.6,0.1,-4 & -0.6,0.1,-2 & -0.6,0.1,0 and so on....
Use case: one of the use case for this method maybe related to #980, let say you already have the tree object named tree.b3d and already made the .animated file.
if you want to make multiple copies of that animated objects you need to write the [object] section again*.
*NOTE: i have encounter a bug for #980, if you write the position
command, the billboard effect will bugged.