Add pickup/drag-and-place mechanic for weapons & armor #7

Merged
scruffydude merged 1 commit from task/2-pickup-drag-place into main 2026-10-01 17:45:12 -04:00
Owner

Adds item.gd (Area2D-based): click-drag-release to pick up and move an item, with a tint while held and a _unhandled_input fallback so the release always registers. Added three draggable items (sword, shield, helmet) scattered off their stands, each with an item_id for the snap-to-stand matching in #3.

Validated with godot --headless --quit and --headless --import (both clean, no errors).

Closes #2

Adds `item.gd` (Area2D-based): click-drag-release to pick up and move an item, with a tint while held and a `_unhandled_input` fallback so the release always registers. Added three draggable items (sword, shield, helmet) scattered off their stands, each with an `item_id` for the snap-to-stand matching in #3. Validated with `godot --headless --quit` and `--headless --import` (both clean, no errors). Closes #2
Adds a reusable item.gd script (Area2D-based) that lets the player
click-and-drag an item: mouse-down starts the drag and tints the item,
mouse-move follows the cursor, mouse-up releases it at the new spot.
Falls back to _unhandled_input for the release so a drag never gets
stuck if the item's collision shape drifts out from under the cursor.

Scattered three draggable items (sword, shield, helmet) away from
their matching stands in the armory scene, each tagged with an
item_id for the snap-to-stand matching in #3.

Validated with `godot --headless --quit` (boots and runs one frame
clean) and `--headless --import` (no import errors).

Closes #2

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
scruffydude/project-awry!7
No description provided.