Land/Water Question
Moderator: Plugin Moderators
- 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
I was wondering if fun can be used to place land and water.
- 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
What code do I need to use to place them with fun?
- Lobby
- Developer
- Reactions:
- Posts: 3705
- Joined: 26 Oct 2008, 12:34
- Plugins: Showcase Store
- Version: Beta
-
Platform
Re: Land/Water Question
It should be as simple as:
This code should place water at the neighboring tile. To place land instead you could just use id "$ground00".
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
}
]
- 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
Okay. I tried it myself, but I used the incorrect ids. Thanks
- Lobby
- Developer
- Reactions:
- Posts: 3705
- Joined: 26 Oct 2008, 12:34
- Plugins: Showcase Store
- Version: Beta
-
Platform
Re: Land/Water Question
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.
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.