Chris' Tutorials
Docs/Grid Placement

Class

GridTargetingState

Generated GDScript class reference for GridPlacement.GridTargetingState.

StatusDraft
Versionv6.0
UpdatedDevelopment docs generated from GDScript source

This is unreleased documentation in active development. APIs, class names, and behavior may change before the final release.

Draft — Unreleased:This page is in active development. APIs, class names, and behavior may change before the release is finalized. Use it as a preview of what's coming — not as a stable integration target.

State for targeting objects within the Grid Building System.

Source: addons/grid_placement/systems/grid_targeting/grid_targeting_state.gd

Syntax

class GridTargetingState extends PlacementResource

Members

NameKindSummary
target_changedEventEmitted when the readiness status of the state has changed - usually after successful validation. Emitted when the target node for the state is changed. NOTE: Typically target is set by a TargetingShapeCast2D or similar casting node from the runtime scene
positioner_changedEventEmitted when the node responsible for positioning grid building placement objects and indicators is changed on the PlacementState.
target_map_changedEventEmitted when the targeted map node is changed. This represents the main target TileMapLayer node on the state.
maps_changedEventEmitted when the list of known maps is changed.[br][br] This is a list of maps that can be accessed without the need for any collision check calls.
is_readyMethod
targetPropertyThe placed node currently being targeted
oldProperty
should_clearProperty
target_3dProperty3D mirror of [member target]. See [method set_manual_target_3d].
positionerPropertyParent node for positioning grid building objects onto the game world.
target_mapPropertyThe TileMapLayer or TileMap node to be used when determining grid distances in your game world [br][br] You could think of this as the main map node usually where characters stand on
target_map_3dProperty3D mirror of [member target_map]. Set by the 3D injector /
positioner_3dProperty3D mirror of [member positioner]. The [GridPositioner3D] is
mapsPropertyAll maps to be known by the targeting state for testing against without casting for collisions. [br][br] You can exclude any purely cosmetic maps that shouldn't have gameplay impacts.
tile_sizePropertyTile size property that delegates to the target map's tile set
collision_exclusionsPropertyNodes that should be excluded from collision detection during indicator validation. This is primarily used during manipulation move operations to exclude the original object being moved, so indicators only detect collisions with OTHER objects. **IMPORTANT**: This list is automatically cleared when: - The target changes (manipulation ends and switches to a different target) - Manually calling clear_collision_exclusions() **Usage**: Set this at the start of manipulation move operations and it will auto-clear when manipulation ends.
is_manual_targeting_activePropertyFlag indicating whether manual targeting mode is currently active. When true, automatic targeting systems (like TargetingShapeCast2D) will not overwrite the manually-set target, and collision_exclusions will persist across target updates. Used during BUILD mode (preview) and MOVE mode (manipulation copy). Set via set_manual_target() and cleared via clear_manual_target().
clear_collision_exclusionsMethod
set_manual_targetMethod
set_manual_target_3dMethod
clear_manual_targetMethod
set_map_objectsMethod
get_target_map_tile_shapeMethod
tile_setProperty
get_target_map_tile_setMethod
get_tile_sizeMethod
tile_setProperty
set_tile_sizeMethod
tile_setProperty
validate_runtimeMethod
issuesProperty
get_ownerMethod
get_owner_rootMethod
get_originMethod
get_editor_issuesMethod
issuesProperty
get_runtime_issuesMethod
issuesProperty
issuesProperty
issuesProperty
currentProperty

Source

addons/grid_placement/systems/grid_targeting/grid_targeting_state.gd

Plugin docs root:gdscript/plugins/grid_placement_dev/docs