Skip to content
CISV2.0GET IT ON FAB

REFERENCEOBJECTS

UCISInteractionDataObject

MODULECharacterInteractionSystemINCLUDEComponents/CISInteractionDataObject.hPARENTUObject

The character's own view of one interaction object: whether the character can see and use the object now, which side of it the character stands in, and the events of a use. Each tracked object has its own data object. It exists only on the machine that controls the character, so a hint or an icon that it draws is seen only by that player. Derive a Blueprint from it to add those events.

Functions

AUTHORITY · server, every machineLOCAL · this machinePURE · read only
int32 GetCurrentSideIndex() const
PUREC++ ONLY

Index of the current use side in the object's InteractionSides, INDEX_NONE when there is none (a side is identified by its index).

UCISUseExecution* GetCurrentExecution() const
PUREC++ ONLY

The execution of the running use that UseObject started (UCISCharacterInteractionComponent::StartUseExecution), null without one.

void OnInitialized(ACharacter* InteractionCharacter, UCISCharacterInteractionComponent* CharacterInteractionComponent, UCISInteractionObjectComponent* InteractionObjectComponent)
LOCAL

Runs once, when the character creates this data object for an object. The character, its interaction component and the object are passed. Local to this machine: it runs only on the machine that controls the character.

void OnOverlapped(ACharacter* InteractionCharacter, UCISCharacterInteractionComponent* CharacterInteractionComponent, UCISInteractionObjectComponent* InteractionObjectComponent, bool bOverlap)
LOCAL

Runs when the object starts to overlap one of the character's triggers (bOverlap is true) and when the overlap ends (false). It runs only when that state changes. Local to this machine: it runs only on the machine that controls the character.

void OnObjectUseFinished(ACharacter* Character, UCISCharacterInteractionComponent* CharacterInteractionComponent, UCISInteractionObjectComponent* InteractionObjectComponent, bool bInterrupted)
LOCAL

Runs when a use of the object ends. bInterrupted is true when the use was interrupted. It runs after the action has finished, if the use had one, and before the object is released. Local to this machine: it runs only on the machine that controls the character.

void OnObjectActionStarted(UCISInteractionObjectAction* Action, ACharacter* Character, UCISCharacterInteractionComponent* CharacterInteractionComponent, UCISInteractionObjectComponent* InteractionObjectComponent)
LOCAL

Runs when the Action of the side starts, with the Action. It runs before the Action's StartInteractionObjectAction. It does not run when the state has no Action for the side, or when the Action does not run on this machine (a ServerOnly Action). Local to this machine: it runs only on the machine that controls the character.

void OnObjectUseStarted(ACharacter* Character, UCISCharacterInteractionComponent* CharacterInteractionComponent, UCISInteractionObjectComponent* InteractionObjectComponent)
LOCAL

Runs when a use of the object starts, before the side's move handler starts. It is the first event of a use. Local to this machine: it runs only on the machine that controls the character.

void OnVisibleChanged(ACharacter* Character, UCISCharacterInteractionComponent* CharacterInteractionComponent, UCISInteractionObjectComponent* InteractionObjectComponent, bool bEnter)
LOCAL

Runs when the object becomes visible to the character (bEnter is true) or hidden from it (false). It runs once with the first value and then each time the value changes. Local to this machine: it runs only on the machine that controls the character.

void OnUsableChanged(ACharacter* Character, UCISCharacterInteractionComponent* CharacterInteractionComponent, UCISInteractionObjectComponent* InteractionObjectComponent, bool bUsable)
LOCAL

Runs when the object becomes usable for the character (bUsable is true) or unusable (false). It runs once with the first value and then each time the value changes. Local to this machine: it runs only on the machine that controls the character.

void OnMovementStarted(ACharacter* Character, UCISCharacterInteractionComponent* CharacterInteractionComponent, UCISInteractionObjectComponent* InteractionObjectComponent)
LOCAL

Runs when the movement of the side starts, before the move handler's StartMovement. It does not run for a side without a move handler, or when the move handler does not run on this machine (a ServerOnly move handler). Local to this machine: it runs only on the machine that controls the character.

void OnMovementEnded(ACharacter* Character, UCISCharacterInteractionComponent* CharacterInteractionComponent, UCISInteractionObjectComponent* InteractionObjectComponent)
LOCAL

Runs when the movement step of the use is complete: the move handler has finished. For a side without a move handler it runs at once. Local to this machine: it runs only on the machine that controls the character.

Properties

TWeakObjectPtr<UCISInteractionObjectComponent> CachedInteractionObjectComponent

The interaction object component of this data object, set by Init. Read-only in Blueprints. Local to this machine: it exists only on the machine that controls the character.

Category
CIS|InteractionDataObject
TWeakObjectPtr<ACharacter> CachedInteractionCharacter

The character that this data object belongs to, set by Init. Read-only in Blueprints. Local to this machine: it exists only on the machine that controls the character.

Category
CIS|InteractionDataObject
TWeakObjectPtr<UCISCharacterInteractionComponent> CachedCharacterInteractionComponent

The character's interaction component that owns this data object. Read-only in Blueprints. Local to this machine: it exists only on the machine that controls the character.

Category
CIS|InteractionDataObject