Tunnels

Learn here how to create and use plugins.

Moderator: Plugin Moderators

User avatar
Lobby
Developer
Reactions:
Posts: 3314
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone model: S7 edge

Platform

Tunnels

#1

Post by Lobby » Fri Feb 16, 2018 0: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:

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 1343 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}
]
...Have a nice stay

User avatar
Mg3094066
Inhabitant of a Supercluster
Reactions:
Posts: 3095
Joined: Sun May 28, 2017 1:50
Location: United Mexican States
Plugins: Show
Version: Beta
Phone model: LG H320mb 5.0.1

Plugin Creator

Platform

Re: Tunnels

#2

Post by Mg3094066 » Fri Feb 16, 2018 1:26

Tunnels ready:
Attachments
ButeoNew_18-02-15_15.23.18.png
I want my diamonds you get the plugins free or not :bd

AwkwrdPrtMskrt
Metropolitan
Reactions:
Posts: 138
Joined: Wed Nov 08, 2017 2:31

Platform

Re: Tunnels

#3

Post by AwkwrdPrtMskrt » Fri Feb 16, 2018 6:19

Is it possible to make my plugin roads cost no diamonds when making tunnels?
:mine Currently working on New Winchester

User avatar
Quardhine
Small-town resident
Reactions:
Posts: 33
Joined: Thu Feb 08, 2018 8:13
Location: Philippines
Plugins: Show
Version: Beta
Phone model: Oppo A37f
Contact:

Platform

Re: Tunnels

#4

Post by Quardhine » Fri Feb 16, 2018 6:22

Did someone said diamonds to build that?

User avatar
Mg3094066
Inhabitant of a Supercluster
Reactions:
Posts: 3095
Joined: Sun May 28, 2017 1:50
Location: United Mexican States
Plugins: Show
Version: Beta
Phone model: LG H320mb 5.0.1

Plugin Creator

Platform

Re: Tunnels

#5

Post by Mg3094066 » Fri Feb 16, 2018 6:40

AwkwrdPrtMskrt wrote:
Fri Feb 16, 2018 6:19
Is it possible to make my plugin roads cost no diamonds when making tunnels?
Nope, that are no implemented
I want my diamonds you get the plugins free or not :bd

User avatar
Mg3094066
Inhabitant of a Supercluster
Reactions:
Posts: 3095
Joined: Sun May 28, 2017 1:50
Location: United Mexican States
Plugins: Show
Version: Beta
Phone model: LG H320mb 5.0.1

Plugin Creator

Platform

Re: Tunnels

#6

Post by Mg3094066 » Sat Feb 17, 2018 4:57

[mention]actemendes[/mention] do u have a problem?
I want my diamonds you get the plugins free or not :bd

Post Reply Previous topicNext topic

Return to “Tutorials and Documentation”

Who is online

Users browsing this forum: No registered users and 1 guest