Tunnels
Posted: 16 Feb 2018, 00:40
See here on how to create road plugins.
To add tunnel support to a road it's sufficient to add the following code to the plugin:
Tunnels will then use the default tunnel frames (16x19 pixels each)
You may use your own frames. Take care to set the handles of each frame correctly (they are used to position the frame for drawing). This might look like
To add tunnel support to a road it's sufficient to add the following code to the plugin:
Code: Select all
"tunnel frames":[
{"x":896,"y":192,"w":16,"h":19,"handle y":7},
{"x":912,"y":192,"w":16,"h":19,"handle x":-16,"handle y":7},
{"x":928,"y":192,"w":16,"h":19,"handle y":7},
{"x":944,"y":192,"w":16,"h":19,"handle x":-16,"handle y":7}
]
Code: Select all
"tunnel frames":[
{"bmp":"tunnel_frames.png","x":0,"w":16,"h":19,"handle y":7},
{"bmp":"tunnel_frames.png","x":16,"w":16,"h":19,"handle x":-16,"handle y":7},
{"bmp":"tunnel_frames.png","x":32,"w":16,"h":19,"handle y":7},
{"bmp":"tunnel_frames.png","x":48,"w":16,"h":19,"handle x":-16,"handle y":7}
]