Construction cranes

Learn here how to create and use plugins.

Moderator: Plugin Moderators

User avatar
CommanderABab
AB
Reactions:
Posts: 11086
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Construction cranes

#1

Post by CommanderABab »

former member wrote:
27 Oct 2017, 18:19
...How to make cranes that will spawn on construction sites when a building is being built:

A crane JSON consists of only the ID, type and frames.

Code: Select all

 
[
   {
          "id":"$sample_crane",
	  "type":"crane",
	  "frames":[{"bmp":"sample_crane.png","w":64,"h":32,"count":4}]
   }
]
...The png file has 4 frames: 2 for the tower, and 2 for the actual crane structure (heading east and north-east).
As an example here's my custom crane image. The image is always 256x64.
matisoncrane.png
You can create your pictures based on this one, but keep in mind the original one was created by Theo.

Of course, cranes will only appear in easy, middle and hard modes.
Thank you for sharing this! Does that crane replace one of the ingame ones, or does it add to the repertoire of cranes?

User avatar
TheFennekin
Neighborhood fox
Reactions:
Posts: 2728
Joined: 24 Aug 2017, 11:17
Location: Wandering around
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Construction cranes

#2

Post by TheFennekin »

Thanks

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

Platform

Re: Construction cranes

#3

Post by Lobby »

The ingame crane has the id "$crane" and contains all available cranes. If you add one with an own id it will be picked with a chance of 50%. Cranes are almost hardcoded and have therefore no features :space

Post Reply Previous topicNext topic

Return to “Tutorials and Documentation”