Rect condition and action: working with rectangles

Any information about the fun attribute is given here.

Moderator: Plugin Moderators

User avatar
CommanderABab
AB
Reactions:
Posts: 8557
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Platform

Plugin Creator

Rect condition and action: working with rectangles

#1

Post by CommanderABab »

Show
Introduced in 473:
🛠Line action
🛠Rect condition and action
🛠Fix palm trees and cacti had auto build set to true
Within a function:
Show
condition

Code: Select all

{"type":"rect","w":10,"h":4,"min":1,"max":9999,"inner":[{...}]}
checks if the inner condition occurs ≥ min times and ≤ max times.
Show
action
similar, it executes the inner actions for each of the specified tiles:

Code: Select all

"actions":[{"type":"rect","w":4,"h":3,"inner":[{...},...]}]
Show
example action

Removing a 4x4 tile area and zoning it dense industrial:

Code: Select all

  "actions":
    [
      {"type":"rect","w":4,"h":4,"inner":
        [
          {"type":"remove"},
          {"type":"build","id":"$zoneindustrial_lvl2"}
        ]
      }
    ]
Does it work? Does it need more?
Try it and see.
Credits: Lobby
888!888Currently using zeta 888. 888 What's that? :)
quantum road tool!!
:)

Telegram - t.me/
🆎️🆎️🆎️🆎️Commander🆎️🆎️

User avatar
FranchuFranchu
Inhabitant of a Country
Reactions:
Posts: 798
Joined: Sun May 28, 2017 0:07
Location: Freezing in Argentina
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Rect condition and action: working with rectangles

#2

Post by FranchuFranchu »

That was really necessary for interchange generators
Did you know you can't blink while smiling :) ?

ElephantEthan
Inhabitant of a Megacity
Reactions:
Posts: 294
Joined: Sun Aug 26, 2018 14:07
Plugins: Show

Platform

Re: Rect condition and action: working with rectangles

#3

Post by ElephantEthan »

Thank you posting this here, I found a discussion about actions and conditions in a certain radiuses and I was about to ask for that to be moved here. :)

User avatar
Mg3094066
Inhabitant of a Supercluster
Reactions:
Posts: 3225
Joined: Sun May 28, 2017 1:50
Location: United Mexican States
Plugins: Show
Version: Beta

Plugin Creator

Platform

Re: Rect condition and action: working with rectangles

#4

Post by Mg3094066 »

Umm... This may be related with reaction...
Can I program a building to react with a disaster?
Idk a sound...?
I threw my dignity to trash and downloaded Free Fire... But someway i liked it ":'D

But i think it was too early to celebrate... my internet runs at 8kb...

Just wait another month... :bb

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 2019
Joined: Thu Jul 07, 2016 22:50
Location: 'Merica
Plugins: Show
Version: Beta
Contact:

Platform

Plugin Creator

Re: Rect condition and action: working with rectangles

#5

Post by KINGTUT10101 »

Shouldnt this be in the "fun attribute" section?

User avatar
Lobby
Developer
Reactions:
Posts: 3497
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta

Platform

Re: Rect condition and action: working with rectangles

#6

Post by Lobby »

True :)
=^._.^= ∫

User avatar
Imran M
Inhabitant of a Megalopolis
Reactions:
Posts: 608
Joined: Wed Oct 24, 2018 13:41
Plugins: Show

Platform

Plugin Creator

Re: Rect condition and action: working with rectangles

#7

Post by Imran M »

Wait, so it make 4x4 rectangle, inner means the space inside it, actions are what it will do inside it? Is this a correct way of putting it?
I have no clue what's happening this year

User avatar
CommanderABab
AB
Reactions:
Posts: 8557
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

Platform

Plugin Creator

Re: Rect condition and action: working with rectangles

#8

Post by CommanderABab »

Yes.
888!888Currently using zeta 888. 888 What's that? :)
quantum road tool!!
:)

Telegram - t.me/
🆎️🆎️🆎️🆎️Commander🆎️🆎️

Post Reply Previous topicNext topic

Return to “Fun attribute”