Quast65 wrote:
... I would like to make a stationtile that changes it's graphics when a train passes it (like the trainshed in the ISR set, that opens/closes a door when a train passes).
I have 8 different graphics (2 platforms x 2 rotations x 2 different graphics on the platforms).
There are 2 ways of doing that ... a wasteful but easy one and a more effective but more difficult one.
a) the easy one ...
place all the sprites for ONE situation in an action-1 block; then add the same of the other situation in a second block. (The same as if you would do a snow/no snow implementation).
Then the var action-2 looks like this :
Code:
02 04 xx 81 44 00 01 01 [go to door open] 00 01 01 [go to door closed] 00
b) the more complex one ...
create 2 tile definitions in an action-0 property 0x09; one using the sprites for doors closed, the other for doors open. Each of these will get a Tile-ID. That could be 0x00 (closed doors) and 0x02 (open doors}. The 2 definitions differ only in sprite numbers used for the one or the other situation.
Then in the CB14 chain check var 44, like this :
Code:
02 04 xx 81 44 00 01 01 00 80 01 01 02 80
setting the Tile-ID to be used.
When displaying the tile it will then either use definition 0x00 without train activity or 0x02 if a train as reserved the track.
BTW, there are only even numbered definitions; the odd ones can be ignored they are for the other direction of a station tile and are dealt with automatically.