Animated pantograph under OpenBve implementation

The animated tutorial can be traced to a specific article of electricity, the show is based on Schlick AF. The pantograph is a simple example of moving the rod are presented. Animated efect is working if a DLL plugin is alredy configured. This article was based on the configuration of Os_Ats1.dll.

The pantograph object

[Meshbuilder]

cylinder 6,0.02,0.02,3.08

rotate 1,0,0,-90

translate 0,0,-1.54

For instance, the name of the object: aramszedo.b3d. Simple hexagonal rods 4cm diameter 3.08 m in length. The origin at the end of the rod. Changing the external view of the rod up and reach the top wire. The length is set building was erected in place to reach the wire, which is 6 meters high.

The animated object



For instance, the name of the object: anime.animated, anime the aramszedo.b3d object.

[OBJECT]

States = aramszedo.b3d

Position = 0,3.43,0

rotateXFunction = if[pluginstate[106]==1, max[value-delta*0.3,0+0.005*sin[time]], min[value+delta*0.4,0.98+0.005*sin[time]]]

rotatexdamping = 2,0.7

Os_Ats1.cfg detail

Configure keyboard keys to control the object.

customindicators=7,102,11,106

11,106 This configuration allows installment the numeric 6 button control the pluginstate[106] states. 7,102 An extension device used to control the future. In this code enable, the numeric 2 button control the pluginstate[102] states.

Animation, based a state of the pantograph

anime.animated animated object further snippet:

[OBJECT] States=front_light.b3d Statefunction = 1- (pluginstate[102] & !pluginstate[106])

Displays the spotlight beam, if press a 2 button, that change the pluginstate[102] state, and the pantograph is up. Down to the pantograph, the light is falling asleep.



This animation have two errors:



*The power is switched on immediately lifting the pantograph, just as it reaches the top wire.

*The pantograph does not affect the status engine controller. In lowered state you can be start the vehicle.


xxxx