Skip to content

Footprint

class Footprint(
tiles: Int = 1,
width: Int = tiles,
length: Int = tiles,
shape: WorldObjectShape? = null,
angle: Int = 0,
blockedSides: Int = BlockedSide.NONE,
val exclusive: Boolean = false
) : Component()
Example
on_world_start {
World.spawn(Assets.Npc.goblin, Tile4.global(3240, 3220)).replaceComponent(Footprint(tiles = 2))
}
on_object_option(Assets.WorldObject.poordoor, "Measure") { player ->
val footprint = Footprint.of(target)
player.message("It spans ${footprint.rotatedWidth} by ${footprint.rotatedLength} tiles.")
}
val exclusive: Boolean
var width: Int
var tiles: Int
override fun onComponentAddedToEntity()
override fun onComponentRemovedFromEntity(): Unit
val rotatedWidth: Int
val rotatedLength: Int
fun pathingEntity(size: Int): Footprint
fun of(worldObject: WorldObject): Footprint