Fun Radius
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
Fun Radius
Is it possible to do an action with a certain radius (like removing a group of buildings within a certain area) or do we still have to code that manually?
- Lobby
- Developer
- Reactions:
- Posts: 3705
- Joined: 26 Oct 2008, 12:34
- Plugins: Showcase Store
- Version: Beta
-
Platform
Re: Fun Radius
There's an action called "rect" that will execute inner actions on a specified rectangle. This code will remove anything in a 5x5 size rect
Code: Select all
"actions":[{
"type":"rect",
"x":-2,
"y":-2,
"w":5,
"h":5,
"inner":[{"type":"remove"}]
}]
- CommanderABab
- AB
- Reactions:
- Posts: 11086
- Joined: 07 Jun 2016, 21:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Fun Radius
Since:
473:
🛠Line action
🛠Rect condition and action
🛠Fix palm trees and cacti had auto build set to true
rect is short for rectangle
What would a rect condition look like?
it counts how often the inner condition is met and checks it against min and max
And the action?
similar, it executes the inner actions for each of the specifiec tiles:
you can use rect action to for example:
Credit: Lobby, questions are mine.
473:
🛠Line action
🛠Rect condition and action
🛠Fix palm trees and cacti had auto build set to true
rect is short for rectangle
What would a rect condition look like?
Code: Select all
{"type":"rect","w":10,"h":4,"min":1,"max":9999,"inner":[{...}]}
And the action?
similar, it executes the inner actions for each of the specifiec tiles:
Code: Select all
"actions":[{"type":"rect","w":4,"h":3,"inner":[{...},...]}]
Code: Select all
"actions":[{"type":"rect","w":4,"h":3,"inner":[{"type":"build","id":"ground"}]}]