Fun Radius

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

Fun Radius

#1

Post by KINGTUT10101 »

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?

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

Platform

Re: Fun Radius

#2

Post by Lobby »

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 :teach

Code: Select all

"actions":[{
  "type":"rect",
  "x":-2,
  "y":-2,
  "w":5,
  "h":5,
  "inner":[{"type":"remove"}]
}]

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

Plugin Creator

Platform

Re: Fun Radius

#3

Post by CommanderABab »

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?

Code: Select all

{"type":"rect","w":10,"h":4,"min":1,"max":9999,"inner":[{...}]}
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:

Code: Select all

"actions":[{"type":"rect","w":4,"h":3,"inner":[{...},...]}]
you can use rect action to for example:

Code: Select all

"actions":[{"type":"rect","w":4,"h":3,"inner":[{"type":"build","id":"ground"}]}]
Credit: Lobby, questions are mine. :)

Post Reply Previous topicNext topic

Return to “Plug-In Discussion”