REFERENCECOMPONENTS
UCISInteractionObjectComponent
Makes an actor usable by a character. It holds the object's state as a gameplay tag, its usable flag and its sides, each with a move handler and an action for each state. It also runs the delegates of a state change and of the start and the end of a use. The actor must replicate for the other players to see the state.
Functions
Sets whether the object is in use (the object's in-use flag). The plugin sets it itself during a use, so Blueprints rarely need this call. A call on a client also sends the value to the server.
- Category
- CIS|InteractionObjectComponent
The interaction settings of this object: its sides, reach, interruption, conditions, data object class and networking options.
- Category
- CIS|InteractionObjectComponent
The state the object is in now, a gameplay tag such as CIS.Object.Door.Closed. The server's value replicates to the other machines.
- Category
- CIS|InteractionObjectComponent
Changes the object's state. Call it on the server. On a client's copy of the object (a simulated proxy, also while the client's controller owns the actor during a use) the change stays on that copy and a warning is logged once; an autonomous proxy also sends the call to the server. OnObjectStateChangedDelegate runs on every machine where the state changes. On the server it runs only when the state differs from the current one.
- Category
- CIS|InteractionObjectComponent
1.x API, kept for compatibility: the action of the side found by FindSideIndex(Side), i.e. the FIRST side with the same angles, for the current object state. Prefer GetObjectActionForSideIndex.
The side at SideIndex in InteractionSides, null for an invalid index.
Index of the first side in InteractionSides whose angles equal those of Side (FCISInteractionObjectSide::operator==), INDEX_NONE if there is none. For code that holds a side by value (1.x API).
Index in InteractionObjectSideActions of the side at SideIndex of the first action whose RequiredStateTag equals GetObjectState(), INDEX_NONE if there is none or SideIndex is invalid.
The action at GetActionIndexForSide(SideIndex) of the side at SideIndex, null if there is none.
Sets the usable flag (bUsable). The same rule as SetObjectState applies: call it on the server. On a client's copy (a simulated proxy) it changes only that copy, with one warning; an autonomous proxy also sends the call to the server. Writing bUsable directly, instead of calling this, is not safe while Manage Owner Dormancy is on.
- Category
- CIS|InteractionObjectComponent
True while the object can be used (its usable flag is on). A use is refused while the flag is off.
- Category
- CIS|InteractionObjectComponent
Who uses this object, as the server knows it: set by the server when it confirms a remote client's use or when a use of a character on the server starts (a standalone game, a listen host, an AI), cleared when that use ends; replicated. User is null while nobody uses the object.
- Category
- CIS|InteractionObjectComponent
The object is in use: the use state names a user, or the object's in-use flag is set.
Sets the use state. Only on the authority; elsewhere it does nothing.
Properties
Not replicated: every machine reads its own copy, built from the same class defaults, Blueprint archetype or level data. A change made at runtime applies only on the machine that makes it.
- Category
- Settings
The state that the server sets when the actor begins play. An empty tag is the empty state. Set it in the class defaults or on a placed actor.
- Category
- Settings
Draws the sides whose Enable Debug is on, during play. Only editor builds draw them: a packaged game draws nothing.
- Default
- false
- Category
- Settings|Debug
Draws the sides whose Enable Debug is on in the level viewport while the actor is selected in the editor, and in the Blueprint editor's preview.
- Default
- true
- Category
- Settings|Debug
The depth priority of the debug lines, from 0 to 1. 0 draws them with the world, so geometry can hide them; 1 draws them in front of it.
- Default
- 0
- Category
- Settings|Debug
The usable flag: the object can be used while it is on. It replicates; change it with SetUsable on the server. Default on.
- Default
- true
- Category
- Settings
Events
Runs when the object's state changes, with the new state. It runs on every machine: where SetObjectState changes the state (on the server, and on a client for its own copy), on clients when the replicated state arrives, and where an Action sets its new state. On a client it can run twice with the same state: when the replicated state arrives first and the client's own Action then sets the same state. A replicated value equal to the client's own state runs nothing. Make the bound code safe to run twice. Bind it to move the object's parts, for example to set the pose of an animation.
- Category
- CIS|Delegates
A use of this object started, on each machine where the use runs (UCISUseExecution: the user's machine, the server and the clients that show the use). Fires after the data object's OnObjectUseStarted, before the move handler starts.
- Category
- CIS|Delegates
The action of a use of this object starts, on the machines that run the action (its NetExecutionPolicy): after the data object's OnObjectActionStarted, before the action's StartInteractionObjectAction.
- Category
- CIS|Delegates
A use of this object ended (bInterrupted: it was interrupted), after the data object's OnObjectUseFinished and after the object was released, before the character's OnEndUseObjectDelegate. Not fired when the object component itself is gone. On the authority (a standalone game, the server, a listen host) the use is released then: the in-use flag is false, the use state (GetUseState) no longer names it and the actor has its previous owner back. On the user's client the in-use flag is false and the previous owner is back; GetUseState is the replicated value. On a client that shows the use both the in-use flag and GetUseState are the replicated values and can still name the user.
- Category
- CIS|Delegates