How-To: Get the Building Blocks
Goal: know how to reach every prerequisite the other pages assume - the option struct, the query, the ability system component, the task nodes, the statics, and the project settings. Everything on this page uses only CrimsonInteraction, CrimsonCommon, and engine types.
The interaction option
FCrimsonInteractionOption (CrimsonCommon) is the unit of currency: one thing the player can do to one target. You create options inside a target's gather callback. In Blueprint you add them to the Out Options array pin of K2 Gather Interaction Options; in C++ you push them through the FCrimsonInteractionOptionBuilder (the builder is C++-only - Blueprint never sees it, the interface handles the stamping for you).
ECrimsonInteractionInputType has exactly two values: Instant and Hold.The interaction query
FCrimsonInteractionQuery (CrimsonCommon) tells targets who is asking. The scan tasks pass it to every GatherInteractionOptions call. You build one when spawning a scan task.
The ability system component
All discovery goes through the engine's own interface - no Crimson types needed. In Blueprint use the Get Ability System Component node (target = any actor); in C++ use UAbilitySystemGlobals::GetAbilitySystemComponentFromActor(Actor) or implement IAbilitySystemInterface on your pawn/player state.
The task nodes
The scan and grant tasks are ability tasks: their factory nodes appear only inside a Gameplay Ability graph (Blueprint) or compile only inside a UGameplayAbility subclass (C++). The node names:
| Blueprint node | C++ factory | Runs on |
|---|---|---|
Wait For Interactable Targets Single Line Trace | UCrimsonAbilityTask_WaitForInteractableTargets_SingleLineTrace::WaitForInteractableTargets_SingleLineTrace | Owning client |
Wait For Interactable Targets Top Down Trace | UCrimsonAbilityTask_WaitForInteractableTargets_TopDownTrace::WaitForInteractableTargets_TopDownTrace | Owning client |
Grant Abilities For Nearby Interactors | UCrimsonAbilityTask_GrantNearbyInteraction::GrantAbilitiesForNearbyInteractors | Server only (self-bails on clients) |
The statics library
UCrimsonInteractionStatics is a Blueprint function library - its nodes are available anywhere:
| Node | Purpose |
|---|---|
Trigger Interaction Option | Fire an option's ability by replicated spec handle (back-fills the target ASC/handle, calls the target's payload hook). The one node your press handler needs. |
Get Actor From Interactable Target | Resolve the owning actor from a target interface reference (actor or component implementer). |
Get Interactable Targets From Actor | All interface implementers on an actor: the actor itself plus matching components. |
Append Interactable Targets From Hit Result | Collect implementers from a trace hit (used when writing custom scan tasks). |
Get Context Actions For Actor | Wrap an actor's options as transient context-menu actions (deterministic client/server order). |
The project settings
Project Settings -> Crimson -> Crimson Interaction (UCrimsonInteractionSettings, stored in DefaultCrimsonInteraction.ini) holds the scan defaults. In C++ read them with UCrimsonInteractionSettings::Get(). The properties are not Blueprint-readable - in Blueprint, type the values you need into your ability's own defaults.
#include "CrimsonInteractionSettings.h" // CrimsonInteractionconst UCrimsonInteractionSettings* S = UCrimsonInteractionSettings::Get();const TEnumAsByte<ECollisionChannel> Channel = S->InteractionTraceChannel; // default: Visibilityconst float Range = S->DefaultScanRange; // default: 500const float Rate = S->DefaultScanRate; // default: 0.1
See also
- Quick Start - puts every block on this page to work.
- API Reference - exact signatures, factory parameters, and settings defaults.