Skip to content
TECHNICALLYARTIST
FAB

Gatherer Component

The Gatherer Component goes on your minion character and runs the whole gather loop. Add it to a Character, point it at an Assignment Definitions data asset, and drive it with the included Behavior Tree or your own.

Set these on the component defaults.

PropertyMeaningDefault
Resource Search RadiusHow far from the home location the minion searches for a matching resource.2500
Available Assignments Data AssetThe Assignment Definitions asset listing every order this minion can take.none

The Gatherer Component details panel showing Resource Search Radius and Available Assignments Data Asset

Read these at runtime (for example, to drive animation).

PropertyTypeMeaning
Current Gathering StateEGathererStateIdle, Extracting, or Carrying. Replicated and read-only.
Character Home LocationVectorWhere the minion drops what it gathers.

Current Gathering State exists specifically to feed your Animation Blueprint: switch between idle, harvesting, and carrying poses off this enum. The demo’s ABP_Minion does exactly that.

All of these are Blueprint-callable. The included Behavior Tree calls them for you in order; call them yourself only if you write your own AI.

FunctionWhat it does
Try Begin Assignment (AssignmentTag, HomeLocation)Start an order. Cancels any in-progress work first. Pass HomeLocation as zero to auto-detect the drop-off from the ground under the minion; pass a world location to set it explicitly. This is a server call.
Update Assignment HomeRe-target the home (and any spawned Home Actor) to the point under the player’s cursor.
Try Find Closest Resource Actor (out ResourceActor)Find the nearest actor whose Resource Tag matches the active order, within the search radius and reachable by navigation.
Try Begin Extracting Overlapping ActorBegin harvesting the resource the minion is currently overlapping. Returns whether extraction started.
Try Spawn Extracted Resource And Attach To CharacterSpawn the order’s carried actor and attach it to the chosen socket.
Detach Extracted Resource From CharacterDrop the carried actor at the home location, where it settles onto the pile.

Calling Try Begin Assignment from input, as an example of giving a minion an order

Bind these BlueprintAssignable delegates to react to the loop.

EventFires when
On Gatherer Extraction CompleteA resource finishes extracting. The carried actor is spawned and attached to the socket at this point.
On Dropped ActorThe carried resource is dropped (at home, or because a new order interrupted the haul).

The carried actor’s Extracted Resource Component binds to On Dropped Actor automatically when it is spawned, so it can fix its own collision on landing; you do not need to wire that yourself.

Try Begin Assignment is safe to call at any time. If the minion is already working, it cancels the in-progress extraction and drops whatever it is carrying in place before starting the new order, so orders never stack up or leak a half-finished haul.