Skip to content
CISV2.0GET IT ON FAB

REFERENCEOBJECTS

UCISInteractionObjectMoveHandler

MODULECharacterInteractionSystemINCLUDEInteractionObjectMoveHandlers/CISInteractionObjectMoveHandler.hPARENTUCISReplicatedObject

Moves the character for a use of an interaction object: it walks the character to a point, turns it, or both. Derive a Blueprint from it, override StartMovement, and call FinishMovement when the movement is done. The side's Action starts after that call, unless the side starts its Action in parallel with the movement.

Functions

AUTHORITY · server, every machineLOCAL · this machinePURE · read only
void FinishMovement()

Ends the movement and runs MovementFinished once. A call while no movement runs, before its start or after its end, does nothing; the plugin logs such a call at the Verbose level of CISLog.

Category
CIS|InteractionObjectMoveHandler
void StartMovement(ACharacter* InteractionCharacter, UCISCharacterInteractionComponent* CharacterInteractionComponent, UCISInteractionObjectComponent* InteractionObjectComponent, UPARAM(ref) const FCISInteractionObjectSide& InteractionObjectSide)

Runs when the movement starts, at the Moving phase of the use, on each machine that runs the handler. Start the movement here, and call FinishMovement when it is done.

void HandlerTick(float DeltaTime, ACharacter* InteractionCharacter, UCISCharacterInteractionComponent* CharacterInteractionComponent, UCISInteractionObjectComponent* InteractionObjectComponent, UPARAM(ref) const FCISInteractionObjectSide& InteractionObjectSide)

Runs every frame from the start of the movement until FinishMovement, and after it as well when Continue Tick After Finish Movement is on, for as long as the object is in use. DeltaTime is the frame time.

void MovementAborted(ACharacter* InteractionCharacter, UCISCharacterInteractionComponent* CharacterInteractionComponent, UCISInteractionObjectComponent* InteractionObjectComponent, UPARAM(ref) const FCISInteractionObjectSide& InteractionObjectSide)

Runs when the use is interrupted, so the handler can undo what it did to the character. A handler that is shared between uses is told even after its movement has finished.

void MovementFinished(ACharacter* InteractionCharacter, UCISCharacterInteractionComponent* CharacterInteractionComponent, UCISInteractionObjectComponent* InteractionObjectComponent, UPARAM(ref) const FCISInteractionObjectSide& InteractionObjectSide)

Runs once, when FinishMovement ends the movement. The side's Action starts after this, unless the side starts it in parallel.

bool IsMovementFinished() const
PURE

True once FinishMovement has ended the movement.

Category
CIS|InteractionObjectMoveHandler

Properties

bool bContinueTickAfterFinishMovement = false

Keep calling HandlerTick after FinishMovement, until the use ends. Off by default.

Default
false
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