Skip to content
CISV2.0GET IT ON FAB

REFERENCEOBJECTS

UCISInteractionObjectAction

MODULECharacterInteractionSystemINCLUDEInteractionObjectActions/CISInteractionObjectAction.hPARENTUCISReplicatedObject

The work of a use on an interaction object, such as playing a montage, a sound or a pick-up. Derive a Blueprint from it, override StartInteractionObjectAction, and call FinishAction when the work is done: the use does not end before that call. The Action runs on the machines that its Net Execution Policy names.

Functions

AUTHORITY · server, every machineLOCAL · this machinePURE · read only
void StartInteractionObjectAction(ACharacter* InteractionCharacter, UCISCharacterInteractionComponent* CharacterInteractionComponent, UCISInteractionObjectComponent* InteractionObjectComponent, UPARAM(ref) const FCISInteractionObjectSide& InteractionObjectSide)

Runs when the Action starts: after the side's move handler has finished, or together with it when the side starts its Action in parallel. Override it to do the work, and call FinishAction when the work is done. It runs on each machine that runs the Action.

void OnUseFinished(ACharacter* InteractionCharacter, UCISCharacterInteractionComponent* CharacterInteractionComponent, UCISInteractionObjectComponent* InteractionObjectComponent, bool bWasInterrupted)

Runs when the Action finishes, also when the use is interrupted (bWasInterrupted). It runs after the new state has been set and before the use ends. Use it for clean-up only.

void FinishAction()

Ends the Action, and with it the use, once the Action has started; a call before the start does nothing. A normal finish sets the new state (when Set New State After Finish Action is on) and then runs OnUseFinished with bWasInterrupted false.

Category
CIS|InteractionObjectAction

Properties

bool bSetNewStateAfterFinishAction = true

When on (the default), the object takes NewStateAfterFinishAction when the Action finishes without an interruption.

Default
true
Category
Settings
FGameplayTag NewStateAfterFinishAction

The state the object takes when the Action finishes normally. An interrupted Action sets no state. The plugin sets it on each machine that runs the Action, and logs no warning for it.

Category
Settings

Inherited from UCISReplicatedObject

Functions

  • GetEffectiveInstancingPolicyThe policy a use applies: Default resolved by the class (C++ -> SharedPerObject, Blueprint -> InstancedPerExecution), then SharedPerObject when the class has its own RPCs or replicated properties (CIS::Migration::ClassHasCustomNetFields).
  • IsWithReplicationbWithReplication (read by the migration).
  • GetExecutionContextThe use this object runs for (UCISUseExecution sets it when the use starts).
  • IsExecutingOnServerThe use runs on the server or in a standalone game (GetExecutionContext().bIsServer).
  • IsLocallyPredictedThe use runs on the user's machine ahead of the server: a client that started it (bIsOwner and not bIsServer).
  • IsSimulatedExecutionThis machine only shows the use of another player (GetExecutionContext().bIsSimulated).
  • WasRejectedByServerThe server rejected the use, which ends as interrupted (GetExecutionContext().bRejectedByServer).
  • SetExecutionContextSets the context returned by GetExecutionContext (UCISUseExecution; a default context means that no use runs this object).
  • GetExecutionTemplateFor a per-execution instance (InstancedPerExecution), the object set on the interaction object that it was copied from; null once that object is gone.
  • IsPerExecutionInstanceTrue for a copy that UCISUseExecution made for one use (InstancedPerExecution).
  • InitPerExecutionInstanceUCISUseExecution: marks this object as the per-execution instance of Template.

Properties