Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
UserAction

Classes

class  BaseActionsManagerComponent
class  BaseActionsManagerComponentClass
class  BaseInteractionHandlerComponentClass
class  BaseLightUserAction
class  BaseUserAction
class  CompartmentUserAction
class  DoorUserAction
class  ExtBaseInteractionHandlerComponentClass
class  ScriptedSignalUserAction
 This action will take care of the synchronization of the signal value. More...
class  ScriptedUserAction
class  TurnOnUserAction
class  UserActionContext
class  VehicleDoorUserAction

Enumerations

enum  EUserActionEvent {
  StartAction , PerformAction , PerformContinuousAction , CancelAction ,
  StartAction , PerformAction , PerformContinuousAction , CancelAction
}
enum  EUserActionEvent {
  StartAction , PerformAction , PerformContinuousAction , CancelAction ,
  StartAction , PerformAction , PerformContinuousAction , CancelAction
}

Functions

BaseInteractionHandlerComponentClass GameComponentClass IsInteractionAvailable ()
 Returns true if any interaction can be done at given moment, i.e. UI should be shown.
proto external BaseUserAction GetSelectedAction ()
proto external float GetVisibilityRange ()
 Returns the global actions visibility range value defined by attribute in this component.
event void OnInit (IEntity owner)
event void OnFrame (IEntity owner, float timeSlice)
 Called every frame, only for local player controller.
event void OnAfterPostSimulate (IEntity owner, float timeSlice)
 Called after post simulate, only for local player controller.
ExtBaseInteractionHandlerComponentClass BaseInteractionHandlerComponentClass SetSelectedAction (BaseUserAction action)
proto external UserActionContext GetCurrentContext ()
 Returns currently gathered (active-preferred) context or null if none.
proto external IEntity GetControlledEntity ()
 Returns the controlled entity or null if none.
proto external int GetFilteredActions (out notnull array< BaseUserAction > outActions, out notnull array< bool > outCanBePerformed)
proto external bool IsContextAvailable ()
 Returns true when there is a gathered context available.
proto external void SetManualNearbyCollectionOverride (bool enabled)
 If set to true, we expect a list of nearby entities to be provided from the user instead.
proto external bool GetManualNearbyCollectionOverride ()
 Returns whether manual nearby collection override is set (we expect a list of nearby entities to be provided from the user instead).
proto external void SetManualCollectionOverride (bool enabled)
 If set to true, we expect a list of entities to be provided from the user instead.
proto external bool GetManualCollectionOverride ()
 Returns whether manual collection override is set (we expect a list of entities to be provided from the user instead).
proto external void SetNearbyCollectionEnabled (bool enabled)
proto external bool GetNearbyCollectionEnabled ()
 Returns whether nearby available context collection is enabled.
proto external float GetNearbyCollectionRadius ()
 Returns the radius in meters that is used for nearby available context collection.
proto external int GetNearbyAvailableContextList (out notnull array< UserActionContext > outContexts)
proto external int GetNearbyShowableContextList (out notnull array< UserActionContext > outContexts)
proto external int GetNearbyUnavailableContextList (out notnull array< UserActionContext > outContexts)
proto external vector UpdateLastReferencePoint (float timeSlice)
void OnControlledEntityChanged (IEntity from, IEntity to)
 Runs every time the controlled entity has been changed.
void OnContextChanged (UserActionContext previousContext, UserActionContext newContext)
void OnPostFrame (IEntity owner, IEntity controlledEntity, float timeSlice)
bool CanContextChange (UserActionContext currentContext, UserActionContext newContext)
bool DoIntersectCheck (IEntity controlledEntity)
bool GetIsInteractionAvailableScript ()
bool GetCanInteractScript (IEntity controlledEntity)
BaseUserAction GetSelectedActionScript ()
array< IEntityGetManualOverrideList (IEntity owner, out vector referencePoint)
array< IEntityGetManualNearbyOverrideList (IEntity owner, out vector referencePoint)
bool IsPerformingAction ()

Detailed Description

Enumeration Type Documentation

◆ EUserActionEvent [1/2]

Enumerator
StartAction 
PerformAction 
PerformContinuousAction 
CancelAction 
StartAction 
PerformAction 
PerformContinuousAction 
CancelAction 

Definition at line 12 of file EUserActionEvent.c.

◆ EUserActionEvent [2/2]

Enumerator
StartAction 
PerformAction 
PerformContinuousAction 
CancelAction 
StartAction 
PerformAction 
PerformContinuousAction 
CancelAction 

Definition at line 12 of file EUserActionEvent.c.

Function Documentation

◆ CanContextChange()

bool CanContextChange ( UserActionContext currentContext,
UserActionContext newContext )
protected

Called before a context is set to determine whether a change can occur.

◆ DoIntersectCheck()

bool DoIntersectCheck ( IEntity controlledEntity)
protected

Should preferred context collection use intersect checks? This will make a ray check against the context's radius. This works well in tight places where relying on physical collisions is impossible - e.g. in vehicle interiors.

◆ GetCanInteractScript()

bool GetCanInteractScript ( IEntity controlledEntity)
protected

Are we allowed to start collecting and processing interactions? Implement custom logic and return true if yes, false otherwise.

Parameters
controlledEntityThe entity that wants to be able to interact (player controlled)

◆ GetControlledEntity()

proto external IEntity GetControlledEntity ( )

Returns the controlled entity or null if none.

Get reference to editable entity controlled by the player this delegate represents.

Returns
Controlled entity

Definition at line 90 of file SCR_EditablePlayerDelegateComponent.c.

◆ GetCurrentContext()

proto external UserActionContext GetCurrentContext ( )

Returns currently gathered (active-preferred) context or null if none.

◆ GetFilteredActions()

proto external int GetFilteredActions ( out notnull array< BaseUserAction > outActions,
out notnull array< bool > outCanBePerformed )

After collection is done, this method can be used for retrieving already checked user actions from current context.

Parameters
outActionsArray that will be filled with user actions that can be shown
outCanBePerformedArray that complements the outActions with result of CanBePerformed check
Returns
Amount of actions gathered, can be 0 if none

◆ GetIsInteractionAvailableScript()

bool GetIsInteractionAvailableScript ( )
protected

Are any user actions available to interact with? Implement and return true if yes, false otherwise.

◆ GetManualCollectionOverride()

proto external bool GetManualCollectionOverride ( )

Returns whether manual collection override is set (we expect a list of entities to be provided from the user instead).

◆ GetManualNearbyCollectionOverride()

proto external bool GetManualNearbyCollectionOverride ( )

Returns whether manual nearby collection override is set (we expect a list of nearby entities to be provided from the user instead).

◆ GetManualNearbyOverrideList()

array< IEntity > GetManualNearbyOverrideList ( IEntity owner,
out vector referencePoint )
protected

Callback when manual nearby collection override is enabled. See SetManualNearbyCollectionOverride. It may return nullptrs inside array if this is called between deletion of instance inside the array and updating of the array.

Parameters
ownerParent entity
referencePointPoint in world space used to calculate distance and sort contexts by

◆ GetManualOverrideList()

array< IEntity > GetManualOverrideList ( IEntity owner,
out vector referencePoint )
protected

Callback when manual collection override is enabled. See SetManualCollectionOverride. It may return nullptrs inside array if this is called between deletion of instance inside the array and updating of the array.

Parameters
ownerParent entity
referencePointPoint in world space used to calculate distance and sort contexts by

◆ GetNearbyAvailableContextList()

proto external int GetNearbyAvailableContextList ( out notnull array< UserActionContext > outContexts)

If nearby collection is enabled, fills the provided array with collected contexts nearby. Only contexts that have at least one action that can be shown and performed are output.

Parameters
outContextsArray of contexts that will be cleared and filled with nearby available contexts.
Returns
Returns the count of output contexts or 0 if none.
Warning
Contexts are no longer going to be valid when their parent entity disappears. Keep this in mind and ideally do not cache these.

◆ GetNearbyCollectionEnabled()

proto external bool GetNearbyCollectionEnabled ( )

Returns whether nearby available context collection is enabled.

◆ GetNearbyCollectionRadius()

proto external float GetNearbyCollectionRadius ( )

Returns the radius in meters that is used for nearby available context collection.

◆ GetNearbyShowableContextList()

proto external int GetNearbyShowableContextList ( out notnull array< UserActionContext > outContexts)

If nearby collection is enabled, fills the provided array with collected contexts nearby. Only contexts that have at least one action that can be shown, but not performed are output.

Parameters
outContextsArray of contexts that will be cleared and filled with nearby available contexts.
Returns
Returns the count of output contexts or 0 if none.
Warning
Contexts are no longer going to be valid when their parent entity disappears. Keep this in mind and ideally do not cache these.

◆ GetNearbyUnavailableContextList()

proto external int GetNearbyUnavailableContextList ( out notnull array< UserActionContext > outContexts)

If nearby collection is enabled, fills the provided array with collected contexts nearby. Only contexts that have at least one action, but none can be shown or performed are output.

Parameters
outContextsArray of contexts that will be cleared and filled with nearby available contexts.
Returns
Returns the count of output contexts or 0 if none.
Warning
Contexts are no longer going to be valid when their parent entity disappears. Keep this in mind and ideally do not cache these.

◆ GetSelectedAction()

proto external BaseUserAction GetSelectedAction ( )

Return currently selected user action or null if none

Definition at line 248 of file SCR_DownloadManager_Dialog.c.

◆ GetSelectedActionScript()

BaseUserAction GetSelectedActionScript ( )
protected

Currently sected action or null if none. Implement and return currently selected action.

◆ GetVisibilityRange()

proto external float GetVisibilityRange ( )

Returns the global actions visibility range value defined by attribute in this component.

◆ IsContextAvailable()

proto external bool IsContextAvailable ( )

Returns true when there is a gathered context available.

◆ IsInteractionAvailable()

Returns true if any interaction can be done at given moment, i.e. UI should be shown.

Base class for interaction handler. This component must be attached to a PlayerController.

◆ IsPerformingAction()

bool IsPerformingAction ( )
protected

◆ OnAfterPostSimulate()

event void OnAfterPostSimulate ( IEntity owner,
float timeSlice )

Called after post simulate, only for local player controller.

◆ OnContextChanged()

void OnContextChanged ( UserActionContext previousContext,
UserActionContext newContext )
protected

Event called when InteractionHandlerComponent finds new target UserActionContext and a change occurs. Both previous and new context might be 'null' if no context is caught in collection.

Parameters
previousContextContext that was active up until this collection - can be null
newContextContext that will be active after this collection - can be null if nothing was caught

◆ OnControlledEntityChanged()

void OnControlledEntityChanged ( IEntity from,
IEntity to )
protected

Runs every time the controlled entity has been changed.

Definition at line 174 of file SCR_ItemPlacementComponent.c.

◆ OnFrame()

event void OnFrame ( IEntity owner,
float timeSlice )

Called every frame, only for local player controller.

Definition at line 1466 of file SCR_VehicleDamageManagerComponent.c.

◆ OnInit()

event void OnInit ( IEntity owner)

Called on initialization. Might not be called unless we already own this item.

Called during EOnInit.

Parameters
ownerEntity this component is attached to.

Definition at line 493 of file SCR_CharacterCommandHandler_Tests.c.

◆ OnPostFrame()

void OnPostFrame ( IEntity owner,
IEntity controlledEntity,
float timeSlice )
protected

Called once per frame after simulation. Can be used for drawing and updating UI.

◆ SetManualCollectionOverride()

proto external void SetManualCollectionOverride ( bool enabled)

If set to true, we expect a list of entities to be provided from the user instead.

◆ SetManualNearbyCollectionOverride()

proto external void SetManualNearbyCollectionOverride ( bool enabled)

If set to true, we expect a list of nearby entities to be provided from the user instead.

◆ SetNearbyCollectionEnabled()

proto external void SetNearbyCollectionEnabled ( bool enabled)

Sets whether nearby available context collection should be enabled.

Parameters
enabledTrue to enable collection, false to disable.

◆ SetSelectedAction()

Collects interactions by performing a sphere cast initially and then a sphere query at the end. Iterates through hit entities and tries to find closest entity with ActionsManagerComponent that has a valid context.

Sets currently select action. Only relevant to the owner of this component, ie. for the local player. Accepts null for when action is to be cleared.

◆ UpdateLastReferencePoint()

proto external vector UpdateLastReferencePoint ( float timeSlice)

Updates the last known interaction reference point's position.

Parameters
timeSliceThe amount of time passed
Returns
Updated position given the amount of time passed.