BlockedBy
##Overview
The BlockedBy
setting(s) state which groups of object will block placement or movement of the Object being defined.
##Syntax
This optional setting is used in materials.txt
and must be within a BEGIN Object...
definition block. It can appear multiple times per definition block, once for each <groupId>
as applicable.
BlockedBy <group>
Where <group>
is any valid Group
used in materials.txt
:
-
Cable
- the large manually placed power cables LargePipe
SmallPipe
StaticObject
UtilityStation
Wall
If no BlockedBy
settings are defined, the item can be placed anywhere, except...
- [Road (Material)](Road (Material)) - Statics and Utilities can't be placed on roads unless they have the
Properties
CanPlaceOnRoad
setting - [Water (Material)](Water (Material)) (as in lakes) - nothing can be placed on or move on lakes. Ever.
- Map border - nothing can be placed on the map border, although entities seem able to walk on it
An additional group seems to have been remove sometime between Alpha 35 and 1.0:
MustBeOutdoors
- required that the object had to be outdoorsThis value seems to have been replaced by
Requirement Type Outdoor
on Rooms, and there no longer seems to be a way to require that certain objects are placed outdoors.
##Examples
Most objects are blocked by Wall
, StaticObject
and UtilityStation
groups, so you'll see this a lot:
BlockedBy Wall
BlockedBy StaticObject
BlockedBy UtilityStation
##Notes
For Entities, BlockedBy
restricts their placement and movement. For all other object types, BlockedBy
only affects placement.
Vehicles seem to completely ignore the BlockedBy
setting. They're driving down that road no matter what, unless a [RoadGate
(Door)](RoadGate (Door)) stops them.
In the base game:
-
Objects with
RenderDepth
3
or above are not usually blocked byStaticObject
but are blocked byUtilityStation
andWall
. - The [
PowerStation
](PowerStation (Utility)) and [WaterPumpStation
](WaterPumpStation (Utility)) are blocked by all groups.
When spawning items with Object.Spawn()
, or changing .Pos
, the BlockedBy
settings are completely ignored. However, when using .NavigateTo()
or .PlayerOrderPos
, the normal restrictions apply.
Tip: Scripts can search for certain collections of object (see .GetNearbyObjects()
) and materials (see Object.GetMaterial()
).
##See Also
^ Open "Pages" to Search
Settings:
*
= multi-use per block...
=BEGIN...END
block
-
Name
<objectId>
-
AttachToWall
true|false
-
AttackPower
<number>
-
AutoOrder
<objectId>
-
AutoOrderQuantity
<num>
-
BlockedBy *
<groupId>
-
BlockMovement
true|false
-
BlockVisibility
true|fals
-
Capturable
true|false
-
ConstructionTime
<time>
-
Contraband ... *
<eqipId>
- [
Entity
](Entity (Callout))<entityId>
-
Equipment
<equipmentId>
-
Group
<groupId>
-
Height
<tiles>
-
IndoorOutdoor
<mode>
-
LikelyObject ... *
<objId>
-
MadeOf
<id>
-
MaxNumber
<number>
-
MaxStackSize
<number>
-
MoveCost
<number>
-
MoveSpeedFactor
<number>
-
NumEntities
<number>
-
NumSlots
<number>
-
NumSprites
<number>
-
ObjectRequired
<consumableId>
-
Price
<number>
-
Properties *
<id>
-
Qualification
-
Range
<tiles>
-
RechargeTime
-
RenderDepth
<number>
-
RenderPostOffset
<number>
-
RenderPreOffset
<number>
-
Requirement ... *
<id>
-
Research
[<researchId>
](Name (research.txt)) -
Rotatable
true|false
-
Scale
<number>
-
SoftEdged
<mode>
-
Sprite
<spriteId>
- [
Sprite ... *
](Sprite (sprites.png))x <offset> y <offset>
w <offset> h <offset>
-
RotateType
<mode>
Marker ... *
-
Sprite0..N ... *
x <x> y <y>
-
SpriteOverlayScale
<num>
-
SpriteScale
<number>
-
SpriteType
<mode>
-
SpriteVariants
<number>
-
StackSprite
<spriteId>
-
Teleportable
true|false
-
ToolbarSprite
<spriteId>
-
Toughness
<number>
-
TwoHanded
true|false
- [
Vehicle
](Vehicle (Callout))<vehicleId>
-
ViewRange
<tiles>
-
Width
<tiles>
-
Workers ...
-
Workgroup
<id>
Equipment:
Name Sprite AttackPower num RechargeTime num Properties Weapons Properties NoImport Properties Improvised Properties Metal Properties Tools Scale TwoHanded true|false Range num Rotatable true|false - eg. book
Callouts:
Name Cost num MaxNumber num Vehicle vehicleId Entity entityId NumEntities Sprite