Tunnels

Learn here how to create and use plugins.

Moderator: Plugin Moderators

User avatar
Lobby
Developer
Reactions:
Posts: 3679
Joined: 26 Oct 2008, 12:34
Plugins: Showcase Store
Version: Beta

Platform

Tunnels

#1

Post 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 4858 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}
]
=^._.^= ∫

User avatar
Mg3094066
Inhabitant of a Supercluster
Reactions:
Posts: 3223
Joined: 28 May 2017, 01:50
Location: Venezuelan Republic of Mexico
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Tunnels

#2

Post by Mg3094066 »

Tunnels ready:
Attachments
ButeoNew_18-02-15_15.23.18.png
I threw my dignity to trash and downloaded Free Fire... But someway i liked it ":'D

But i think it was too early to celebrate... my internet runs at 8kb...

Just wait another month... :bb

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

Platform

Re: Tunnels

#3

Post by AwkwrdPrtMskrt »

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: 08 Feb 2018, 08:13
Location: Philippines
Plugins: Showcase Store
Version: Beta
Contact:

Platform

Re: Tunnels

#4

Post by Quardhine »

Did someone said diamonds to build that?

User avatar
Mg3094066
Inhabitant of a Supercluster
Reactions:
Posts: 3223
Joined: 28 May 2017, 01:50
Location: Venezuelan Republic of Mexico
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Tunnels

#5

Post 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
I threw my dignity to trash and downloaded Free Fire... But someway i liked it ":'D

But i think it was too early to celebrate... my internet runs at 8kb...

Just wait another month... :bb

User avatar
Mg3094066
Inhabitant of a Supercluster
Reactions:
Posts: 3223
Joined: 28 May 2017, 01:50
Location: Venezuelan Republic of Mexico
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Tunnels

#6

Post by Mg3094066 »

@actemendes do u have a problem?
I threw my dignity to trash and downloaded Free Fire... But someway i liked it ":'D

But i think it was too early to celebrate... my internet runs at 8kb...

Just wait another month... :bb

Post Reply Previous topicNext topic

Return to “Tutorials and Documentation”