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).

Make CrimsonInteractionOption -> set Text / Input Type / Interaction Ability To Grant -> Add to the Out Options array pin of K2 Gather Interaction Options.
Verify
The full field list is in API Reference. 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.

Make CrimsonInteractionQuery -> Requesting Avatar = Get Avatar Actor From Actor Info, Requesting Controller = Get Player Controller.

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 nodeC++ factoryRuns on
Wait For Interactable Targets Single Line TraceUCrimsonAbilityTask_WaitForInteractableTargets_SingleLineTrace::WaitForInteractableTargets_SingleLineTraceOwning client
Wait For Interactable Targets Top Down TraceUCrimsonAbilityTask_WaitForInteractableTargets_TopDownTrace::WaitForInteractableTargets_TopDownTraceOwning client
Grant Abilities For Nearby InteractorsUCrimsonAbilityTask_GrantNearbyInteraction::GrantAbilitiesForNearbyInteractorsServer only (self-bails on clients)

The statics library

UCrimsonInteractionStatics is a Blueprint function library - its nodes are available anywhere:

NodePurpose
Trigger Interaction OptionFire 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 TargetResolve the owning actor from a target interface reference (actor or component implementer).
Get Interactable Targets From ActorAll interface implementers on an actor: the actor itself plus matching components.
Append Interactable Targets From Hit ResultCollect implementers from a trace hit (used when writing custom scan tasks).
Get Context Actions For ActorWrap 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.

cpp
#include "CrimsonInteractionSettings.h" // CrimsonInteraction
const UCrimsonInteractionSettings* S = UCrimsonInteractionSettings::Get();
const TEnumAsByte<ECollisionChannel> Channel = S->InteractionTraceChannel; // default: Visibility
const float Range = S->DefaultScanRange; // default: 500
const 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.