Land/Water Question

Plug-in related stuff can be discussed here.

Moderator: Plugin Moderators

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 2220
Joined: 07 Jul 2016, 22:50
Location: 'Merica
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Land/Water Question

#1

Post by KINGTUT10101 »

I was wondering if fun can be used to place land and water.

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

Platform

Re: Land/Water Question

#2

Post by Lobby »

Not yet.

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 2220
Joined: 07 Jul 2016, 22:50
Location: 'Merica
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Re: Land/Water Question

#3

Post by KINGTUT10101 »

What code do I need to use to place them with fun?

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

Platform

Re: Land/Water Question

#4

Post by Lobby »

It should be as simple as:

Code: Select all

"fun":[
  {
    "condition":{"type":"land","x":1},                     // Checks that there's currently land
    "actions":[{"type":"build","id":"$water00","x":1}]     // Places water ground then
  }
]
This code should place water at the neighboring tile. To place land instead you could just use id "$ground00".

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 2220
Joined: 07 Jul 2016, 22:50
Location: 'Merica
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Re: Land/Water Question

#5

Post by KINGTUT10101 »

Okay. I tried it myself, but I used the incorrect ids. Thanks

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

Platform

Re: Land/Water Question

#6

Post by Lobby »

I'm sorry for missing documentation...

Condition "buildable" can check for nearly anything (given by "id") whether it can be built
Condition "land" can check whether there's land
Condition "water" can check whether there's water

Action "build" can build nearly anything (given by "id") as long as it is buildable there (uses built-in checks to prevent bugs)

A relative position can always be provided by setting "x" and "y". They are zero by default which means the position of the building that caused the fun calculations.

Post Reply Previous topicNext topic

Return to “Plug-In Discussion”