Page 1 of 1
"skip x" and "skip y" attributes for rect action/condition
Posted: 02 Sep 2018, 00:05
by FranchuFranchu
The code:
Code: Select all
"actions":[{
"type":"rect",
"w":9,
"h":9,
"skip x":3,
"skip y":3,
"inner":[{
"type":"build",
"id":"$whatever"
}]
}]
Should have this result:
Re: "skip x" and "skip y" attributes for rect action/condition
Posted: 02 Sep 2018, 09:38
by ElephantEthan
I don't think this is needed, it's easy enough to do with "build".
Re: "skip x" and "skip y" attributes for rect action/condition
Posted: 02 Sep 2018, 13:41
by CommanderABab
Re: "skip x" and "skip y" attributes for rect action/condition
Posted: 06 Feb 2019, 05:27
by Mg3094066
wut?
Re: "skip x" and "skip y" attributes for rect action/condition
Posted: 06 Feb 2019, 14:48
by Lobby
I agree, this could have been a useful feature, but there are a lot of potential features like this one and it's hard to add each one of them manually.
Therefore I would recommend to use
nowadays. This might look like
Code: Select all
local function buildRect(draft, x, y, width, height, stepx, stepy)
stepx = stepx or 1
stepy = stepy or 1
for oy=0,height-1,stepy do
for ox=0,width-1,stepx do
if Builder.isBuildingBuildable(draft, x + ox, y + oy) then
Builder.buildBuilding(draft, x + ox, y + oy)
end
end
end
end
Re: "skip x" and "skip y" attributes for rect action/condition
Posted: 06 Feb 2019, 20:48
by CommanderABab
You could also use a 3x3 building that when built removes itself and builds the 9 tiles in the pattern shown.