Page 1 of 1

Tunnels

Posted: 16 Feb 2018, 00:40
by Lobby
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:

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}
]
Tunnels will then use the default tunnel frames (16x19 pixels each) :img
tunnel_frames.png
tunnel_frames.png (1.74 KiB) Viewed 7055 times
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 :json

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}
]

Re: Tunnels

Posted: 16 Feb 2018, 01:26
by Mg3094066
Tunnels ready:

Re: Tunnels

Posted: 16 Feb 2018, 06:19
by AwkwrdPrtMskrt
Is it possible to make my plugin roads cost no diamonds when making tunnels?

Re: Tunnels

Posted: 16 Feb 2018, 06:22
by Quardhine
Did someone said diamonds to build that?

Re: Tunnels

Posted: 16 Feb 2018, 06:40
by Mg3094066
AwkwrdPrtMskrt wrote:
16 Feb 2018, 06:19
Is it possible to make my plugin roads cost no diamonds when making tunnels?
Nope, that are no implemented

Re: Tunnels

Posted: 17 Feb 2018, 04:57
by Mg3094066
@actemendes do u have a problem?

Re: Tunnels

Posted: 14 Jan 2023, 23:14
by FVI
I got two questions.
Where can I get the textures of these tunnels please?
Is there a different code to get these tunnels?
IMG_20230114_211032.jpg
I need the codes so I can test the quality of the tunnels
Thanks!