;KEY BINDINGS FOR ANIMATED OBJECTS:
;pluginstate[51]  = Tripcock activation state
;pluginstate[53]  = 3rd rail gap state
;pluginstate[101] = 0 key - USED CURRENTLY FOR INTERIOR LIGHTING
;pluginstate[100] = 9 key - USED CURRENTLY FOR LCD SIGN LAMP
;pluginstate[99]  = 8 key - USED CURRENTLY FOR LCD SIGNS
;pluginstate[93]  = 7 key - USED CURRENTLY FOR ROLLSIGN
;pluginstate[104] = 6 key - USED CURRENTLY FOR LAST STOP INDICATION
;pluginstate[102] = 5 key - USED FOR MOTORMAN IN FIRST CAR
;pluginstate[99] = 4 key 
;TO BIND TWO PLUGINSTATES, USE "&" BETWEEN THE STATES (example: StateFunction = pluginstate[53] & pluginstate[101])


[Object]
States = Bodya0.b3d, bodya.b3d
Statefunction =  pluginstate[101]
position= 0, 0, 0

[Object]
Position = 0, 0, 0
states= ...\cars\LCDLAMP0.b3d, ...\cars\LCDLAMP1.b3d 
Statefunction = pluginstate[100]

[Object]
Position = 1.277, 3.113, 9.277
States = Door_IndicatorR_OffNE.b3d , Door_IndicatorR_Off.b3d
StateFunction = pluginstate[101]

[Object]
Position = 1.275, 3.106, 6.153
States = Door_IndicatorR_OffNE.b3d , Door_IndicatorR_Off.b3d
StateFunction = pluginstate[101]

[Object]
Position = 1.275, 3.106, 3.872
States = Door_IndicatorR_OffNE.b3d , Door_IndicatorR_Off.b3d
StateFunction = pluginstate[101]

[Object]
Position = 1.275, 3.106, 0.675
States = Door_IndicatorR_OffNE.b3d , Door_IndicatorR_Off.b3d
StateFunction = pluginstate[101]

[Object]
Position = 1.275, 3.108, -1.608
States = Door_IndicatorR_OffNE.b3d , Door_IndicatorR_Off.b3d
StateFunction = pluginstate[101]

[Object]
Position = 1.275, 3.108, -4.802
States = Door_IndicatorR_OffNE.b3d , Door_IndicatorR_Off.b3d
StateFunction = pluginstate[101]

[Object]
Position = 1.275, 3.108, -7.077
States = Door_IndicatorR_OffNE.b3d , Door_IndicatorR_Off.b3d
StateFunction = pluginstate[101]

[Object]
Position = 1.274, 3.106, -10.257
States = Door_IndicatorR_OffNE.b3d , Door_IndicatorR_Off.b3d
StateFunction = pluginstate[101]

[Object]
Position = -1.28, 3.106, 9.305
States = Door_IndicatorL_OffNE.b3d , Door_IndicatorL_Off.b3d
StateFunction = pluginstate[101]

[Object]
Position = -1.28, 3.106, 6.19
States = Door_IndicatorL_OffNE.b3d , Door_IndicatorL_Off.b3d
StateFunction = pluginstate[101]

[Object]
Position = -1.28, 3.106, 3.835
States = Door_IndicatorL_OffNE.b3d , Door_IndicatorL_Off.b3d
StateFunction = pluginstate[101]

[Object]
Position = -1.28, 3.106, 0.697
States = Door_IndicatorL_OffNE.b3d , Door_IndicatorL_Off.b3d
StateFunction = pluginstate[101]

[Object]
Position = -1.28, 3.099, -1.631
States = Door_IndicatorL_OffNE.b3d , Door_IndicatorL_Off.b3d
StateFunction = pluginstate[101]

[Object]
Position = -1.28, 3.108, -4.749
States = Door_IndicatorL_OffNE.b3d , Door_IndicatorL_Off.b3d
StateFunction = pluginstate[101]

[Object]
Position = -1.28, 3.103, -7.104
States = Door_IndicatorL_OffNE.b3d , Door_IndicatorL_Off.b3d
StateFunction = pluginstate[101]

[Object]
Position = -1.28, 3.106, -10.248
States = Door_IndicatorL_OffNE.b3d , Door_IndicatorL_Off.b3d
StateFunction = pluginstate[101]

;Rollsigns and LCD

[object]
Position = 0, 0, 0
states = ...\cars\LCD\A207.b3d, ...\cars\LCD\ALef.b3d, ...\cars\LCD\AFarRock.b3d, ...\cars\LCD\BBr.b3d,  ...\cars\LCD\B145.b3d,  ...\cars\LCD\BBed.b3d, ...\cars\LCD\CLefferts.b3d, ...\cars\LCD\CEuclid.b3d, ...\cars\LCD\C168.b3d, ...\cars\LCD\D205.b3d, ...\cars\LCD\DCI.b3d, ...\cars\LCD\EUnion.b3d, ...\cars\LCD\E179.b3d, ...\cars\LCD\EJC.b3d, ...\cars\LCD\EWTC.b3d, ...\cars\LCD\EFR.b3d, ...\cars\LCD\F179.b3d, ...\cars\LCD\FEuclid.b3d, ...\cars\LCD\FCIEXP.b3d , ...\cars\LCD\FCILCL.b3d, ...\cars\LCD\GLIC.b3d, ...\cars\LCD\GS9.b3d, ...\cars\LCD\GChurch.b3d, ...\cars\LCD\G18.b3d, ...\cars\LCD\HEuclid.b3d, ...\cars\LCD\HBroad.b3d, ...\cars\LCD\HRockpk.b3d, ...\cars\LCD\JJC.b3d, ...\cars\LCD\JCham.b3d, ...\cars\LCD\JBroad.b3d, ...\cars\LCD\K168.b3d, ...\cars\LCD\KWTC.b3d, ...\cars\LCD\L8AV.b3d, ...\cars\LCD\LCan.b3d, ...\cars\LCD\MMetro.b3d, ...\cars\LCD\MCham.b3d, ...\cars\LCD\MBay.b3d, ...\cars\LCD\NDitmarsExp.b3d, ...\cars\LCD\NDitmarsLcl.b3d, ...\cars\LCD\NCIExpLcl.b3d, ...\cars\LCD\NCIExpExp.b3d, ...\cars\LCD\NCILclExp.b3d, ...\cars\LCD\NCILclLcl.b3d, ...\cars\LCD\Queensbridge.b3d, ...\cars\LCD\QDitmars.b3d, ...\cars\LCD\QCI.b3d, ...\cars\LCD\RJC.b3d, ...\cars\LCD\RForest.b3d, ...\cars\LCD\RBay.b3d, ...\cars\LCD\R36Shut.b3d, ...\cars\LCD\RBayShut.b3d, ...\cars\LCD\SBroad.b3d, ...\cars\LCD\SRockPk.b3d, ...\cars\LCD\SFrank.b3d, ...\cars\LCD\SPros.b3d, ...\cars\LCD\VForest.b3d, ...\cars\LCD\V2A.b3d, ...\cars\LCD\VCI.b3d, ...\cars\LCD\WDitmars.b3d, ...\cars\LCD\WWhite.b3d, ...\cars\LCD\WCI.b3d, ...\cars\LCD\ZJC.b3d, ...\cars\LCD\ZCham.b3d, ...\cars\LCD\ZBroad.b3d, ...\cars\LCD\NIS.b3d, ...\cars\LCD\SPCL.b3d, ...\cars\LCD\Shuttle.b3d, ...\cars\LCD\YES.b3d, ...\cars\LCD\FungWah.b3d
Statefunction = Mod[value+delta*pluginstate[99], 71]
TextureShiftYFunction = 0.25 * floor[mod[Time * 0.3, 4]]

[object]
Position = 0, 0, 0
states = ...\cars\LCD\LCDLAMPNull.b3d, ...\cars\LCD\WTT.b3d
Statefunction = Pluginstate[51]
TextureShiftYFunction = 0.25 * floor[mod[Time * 0.3, 4]]

[object]
Position = 0, 0, 0
states = ...\cars\LCD\LCDLAMPNull.b3d, ...\cars\LCD\LST.b3d
Statefunction = Pluginstate[104]
TextureShiftYFunction = 0.25 * floor[mod[Time * 0.3, 4]]

[object]
Position = 0, 0, 0
states = ...\cars\LCD\LCDLAMPNull.b3d, ...\cars\LCD\LCDLAMP01.b3d
StateFunction = Pluginstate[51]

[object]
Position = 0, 0, 0
states = ...\cars\LCD\LCDLAMPNull.b3d, ...\cars\LCD\LCDLAMP01.b3d
StateFunction = Pluginstate [104]

[Object]
Position = 0, 0, 0
states= ...\cars\Rollsign\Route.b3d
TextureShiftXFunction = value + (0.0030 * pluginstate[93]) 


;Doors

[Object]
Position = 1.368, 0, 8.112
States = doorr10.b3d, doorr1.b3d
Statefunction =  pluginstate[101]
TranslateZFunction = if[leftdoorstarget==0, max[value-delta*0.8/1.8,0], min[value+delta*0.8/1.5,0.8]]

[Object]
Position = 1.368, 0, 7.428
States = doorr20.b3d, doorr2.b3d
Statefunction =  pluginstate[101]
TranslateZFunction = if[leftdoorstarget==0, min[value+delta*0.8/1.8,0], max[value-delta*0.8/1.5,-0.8]]

[Object]
Position = 1.368, 0, 2.637
States = doorr10.b3d, doorr1.b3d
Statefunction =  pluginstate[101]
TranslateZFunction = if[leftdoorstarget==0, max[value-delta*0.8/1.8,0], min[value+delta*0.8/1.5,0.8]]

[Object]
Position = 1.368, 0, 1.953
States = doorr20.b3d, doorr2.b3d
Statefunction =  pluginstate[101]
TranslateZFunction = if[leftdoorstarget==0, min[value+delta*0.8/1.8,0], max[value-delta*0.8/1.5,-0.8]]

[Object]
Position = 1.368, 0, -2.830
States = doorr10.b3d, doorr1.b3d
Statefunction =  pluginstate[101]
TranslateZFunction = if[leftdoorstarget==0, max[value-delta*0.8/1.8,0], min[value+delta*0.8/1.5,0.8]]

[Object]
Position = 1.368, 0, -3.514
States = doorr20.b3d, doorr2.b3d
Statefunction =  pluginstate[101]
TranslateZFunction = if[leftdoorstarget==0, min[value+delta*0.8/1.8,0], max[value-delta*0.8/1.5,-0.8]]

[Object]
Position = 1.368, 0, -8.328
States = doorr10.b3d, doorr1.b3d
Statefunction =  pluginstate[101]
TranslateZFunction = if[leftdoorstarget==0, max[value-delta*0.8/1.8,0], min[value+delta*0.8/1.5,0.8]]

[Object]
Position = 1.368, 0, -9.012
States = doorr20.b3d, doorr2.b3d
Statefunction =  pluginstate[101]
TranslateZFunction = if[leftdoorstarget==0, min[value+delta*0.8/1.8,0], max[value-delta*0.8/1.5,-0.8]]

[Object]
Position = -1.386, 0, 8.112
States = doorl10.b3d, doorl1.b3d
Statefunction =  pluginstate[101]
TranslateZFunction = if[rightdoorstarget==0, max[value-delta*0.8/1.8,0], min[value+delta*0.8/1.5,0.8]]

[Object]
Position = -1.386, 0, 7.428
States = doorl20.b3d, doorl2.b3d
Statefunction =  pluginstate[101]
TranslateZFunction = if[rightdoorstarget==0, min[value+delta*0.8/1.8,0], max[value-delta*0.8/1.5,-0.8]]

[Object]
Position = -1.386, 0, 2.637
States = doorl10.b3d, doorl1.b3d
Statefunction =  pluginstate[101]
TranslateZFunction = if[rightdoorstarget==0, max[value-delta*0.8/1.8,0], min[value+delta*0.8/1.5,0.8]]

[Object]
Position = -1.386, 0, 1.953
States = doorl20.b3d, doorl2.b3d
Statefunction =  pluginstate[101]
TranslateZFunction = if[rightdoorstarget==0, min[value+delta*0.8/1.8,0], max[value-delta*0.8/1.5,-0.8]]

[Object]
Position = -1.386, 0, -2.830
States = doorl10.b3d, doorl1.b3d
Statefunction =  pluginstate[101]
TranslateZFunction = if[rightdoorstarget==0, max[value-delta*0.8/1.8,0], min[value+delta*0.8/1.5,0.8]]

[Object]
Position = -1.386, 0, -3.514
States = doorl20.b3d, doorl2.b3d
Statefunction =  pluginstate[101]
TranslateZFunction = if[rightdoorstarget==0, min[value+delta*0.8/1.8,0], max[value-delta*0.8/1.5,-0.8]]

[Object]
Position = -1.386, 0, -8.328
States = doorl10.b3d, doorl1.b3d
Statefunction =  pluginstate[101]
TranslateZFunction = if[rightdoorstarget==0, max[value-delta*0.8/1.8,0], min[value+delta*0.8/1.5,0.8]]

[Object]
Position = -1.386, 0, -9.012
States = doorl20.b3d, doorl2.b3d
Statefunction =  pluginstate[101]
TranslateZFunction = if[rightdoorstarget==0, min[value+delta*0.8/1.8,0], max[value-delta*0.8/1.5,-0.8]]

;Headlights

[Object]
Position = -0.73, 1.66, 11.06
States = glow_white.b3d
StateFunction=If[Cars<1|ReverserNotch<0,0,1]

[Object]
Position = 0.73, 1.66, 11.06
States = glow_white.b3d
StateFunction=If[Cars<1|ReverserNotch<0,0,1]

[Object]
Position = 1.06, 1.66, 10.98
States = glow_red.b3d
StateFunction=If[Cars<1|ReverserNotch>0,0,1]

[Object]
Position = -1.06, 1.66, 10.98
States = glow_red.b3d
StateFunction=If[Cars<1|ReverserNotch>0,0,1]

;Door Indicators

[Object]
Position = -1.28, 3.106, 9.305
States = Door_IndicatorL_On.b3d
StateFunction = If[rightdoors>0,0,1]

[Object]
Position = -1.28, 3.106, 6.19
States = Door_IndicatorL_On.b3d
StateFunction = If[rightdoors>0,0,1]

[Object]
Position = -1.28, 3.106, 3.835
States = Door_IndicatorL_On.b3d
StateFunction = If[rightdoors>0,0,1]

[Object]
Position = -1.28, 3.106, 0.697
States = Door_IndicatorL_On.b3d
StateFunction = If[rightdoors>0,0,1]

[Object]
Position = -1.28, 3.099, -1.631
States = Door_IndicatorL_On.b3d
StateFunction = If[rightdoors>0,0,1]

[Object]
Position = -1.28, 3.108, -4.749
States = Door_IndicatorL_On.b3d
StateFunction = If[rightdoors>0,0,1]

[Object]
Position = -1.28, 3.103, -7.104
States = Door_IndicatorL_On.b3d
StateFunction = If[rightdoors>0,0,1]

[Object]
Position = -1.28, 3.106, -10.248
States = Door_IndicatorL_On.b3d
StateFunction = If[rightdoors>0,0,1]

[Object]
Position = 1.277, 3.113, 9.277
States = Door_IndicatorR_ON.b3d
StateFunction = If[leftdoors>0,0,1]

[Object]
Position = 1.275, 3.106, 6.153
States = Door_IndicatorR_ON.b3d
StateFunction = If[leftdoors>0,0,1]

[Object]
Position = 1.275, 3.106, 3.872
States = Door_IndicatorR_ON.b3d
StateFunction = If[leftdoors>0,0,1]

[Object]
Position = 1.275, 3.106, 0.675
States = Door_IndicatorR_ON.b3d
StateFunction = If[leftdoors>0,0,1]

[Object]
Position = 1.275, 3.108, -1.608
States = Door_IndicatorR_ON.b3d
StateFunction = If[leftdoors>0,0,1]

[Object]
Position = 1.275, 3.108, -4.802
States = Door_IndicatorR_ON.b3d
StateFunction = If[leftdoors>0,0,1]

[Object]
Position = 1.275, 3.108, -7.077
States = Door_IndicatorR_ON.b3d
StateFunction = If[leftdoors>0,0,1]

[Object]
Position = 1.274, 3.106, -10.257
States = Door_IndicatorR_ON.b3d
StateFunction = If[leftdoors>0,0,1]

[Object]
Position = 1.277, 3.113, 9.277
States = Door_IndicatorR_offA.b3d
StateFunction = If[leftdoors>0,1,0]

[Object]
Position = 1.275, 3.106, 6.153
States = Door_IndicatorR_offA.b3d
StateFunction = If[leftdoors>0,1,0]

[Object]
Position = 1.275, 3.106, 3.872
States = Door_IndicatorR_offA.b3d
StateFunction = If[leftdoors>0,1,0]

[Object]
Position = 1.275, 3.106, 0.675
States = Door_IndicatorR_offA.b3d
StateFunction = If[leftdoors>0,1,0]

[Object]
Position = 1.275, 3.108, -1.608
States = Door_IndicatorR_offA.b3d
StateFunction = If[leftdoors>0,1,0]

[Object]
Position = 1.275, 3.108, -4.802
States = Door_IndicatorR_offA.b3d
StateFunction = If[leftdoors>0,1,0]

[Object]
Position = 1.275, 3.108, -7.077
States = Door_IndicatorR_offA.b3d
StateFunction = If[leftdoors>0,1,0]

[Object]
Position = 1.274, 3.106, -10.257
States = Door_IndicatorR_offA.b3d
StateFunction = If[leftdoors>0,1,0]

[Object]
Position = -1.28, 3.106, 9.305
States = Door_IndicatorL_offA.b3d
StateFunction = If[rightdoors>0,1,0]

[Object]
Position = -1.28, 3.106, 6.19
States = Door_IndicatorL_offA.b3d
StateFunction = If[rightdoors>0,1,0]

[Object]
Position = -1.28, 3.106, 3.835
States = Door_IndicatorL_offA.b3d
StateFunction = If[rightdoors>0,1,0]

[Object]
Position = -1.28, 3.106, 0.697
States = Door_IndicatorL_offA.b3d
StateFunction = If[rightdoors>0,1,0]

[Object]
Position = -1.28, 3.099, -1.631
States = Door_IndicatorL_offA.b3d
StateFunction = If[rightdoors>0,1,0]

[Object]
Position = -1.28, 3.108, -4.749
States = Door_IndicatorL_offA.b3d
StateFunction = If[rightdoors>0,1,0]

[Object]
Position = -1.28, 3.103, -7.104
States = Door_IndicatorL_offA.b3d
StateFunction = If[rightdoors>0,1,0]

[Object]
Position = -1.28, 3.106, -10.248
States = Door_IndicatorL_offA.b3d
StateFunction = If[rightdoors>0,1,0]

[Object]
Position = 0, 0, 0
States = light_on_L.b3d
StateFunction = If[rightdoors>0,0,1]

[Object]
Position = 0, 0, 0
States = light_on_R.b3d
StateFunction = If[leftdoors>0,0,1]

[Object]
Position = 0, 0, 0
States = light_off_L.b3d
StateFunction = If[rightdoors>0,1,0]

[Object]
Position = 0, 0, 0
States = light_off_R.b3d
StateFunction = If[leftdoors>0,1,0]