Arma Reforger Script API
Loading...
Searching...
No Matches
BaseUserAction Interface Reference
Inheritance diagram for BaseUserAction:
PickupAction ScriptedUserAction BaseLightUserAction BurnUserAction CompartmentUserAction DoorUserAction SCR_ActivateMineUserAction SCR_AddTarget SCR_CampaignBuildingDisassemblyUserAction SCR_CampaignBuildingStartUserAction SCR_CampaignDeployMobileAssemblyUserAction SCR_CampaignReconfigureHQRadioUserAction SCR_CampaignReconfigureRelayUserAction SCR_CampaignRepairEntityUserAction SCR_CatalogSpawnerUserAction SCR_ChangeBallisticPageAction SCR_ChangeFuzeTimerUserAction SCR_DeployInventoryItemBaseAction SCR_DismantleInventoryItemBaseAction SCR_EnableDefendersAction SCR_FastTravelAction SCR_FlushToilet SCR_HealingUserAction SCR_InspectCasualtyUserAction SCR_InventoryAction SCR_LadderUserAction SCR_LightFireplaceUserAction SCR_MineAddFlagAction SCR_PlayInstrument SCR_RemoveTarget SCR_ReplaceWheelUserAction SCR_ResourceContainerStoreAction SCR_ScriptedUserAction SCR_SetTargetDistanceDownUserAction SCR_SetTargetDistanceUpUserAction SCR_SetTargetsModeUserAction SCR_ShowDeployableSpawnPointInfo SCR_SwitchFlashlightLensAction SCR_SwitchLightUserAction SCR_TestScriptedRadioMsgUserAction SCR_ToggleDeployableSpawnPointLoadoutAction SCR_TurretAssemblyAction SCR_TurretPickUpItemAction SCR_TutorialCourseSelectionUserAction SCR_TutorialDeployMobileAssembly SCR_TutorialOpenFastTravelInterface SCR_TutorialReturnToMenuAction SCR_UserActionWithOccupancy SCR_VehicleActionBase SCR_WeaponAction SCR_WeaponLoadAction ScriptedSignalUserAction TestDragUserAction TestPushUserAction ThrowGrenadeAction TurnOnUserAction VehicleDoorUserAction

Public Member Functions

void SetCannotPerformReason (string reason)
 Sets the reason why action couldn't be performed.
 
string GetCannotPerformReason ()
 Returns the reason why action couldn't be performed.
 
proto external int GetContextIndex (string sContextName)
 Returns the index of the context this action is registered in as or -1 if none.
 
proto external void SetActiveContext (UserActionContext context)
 Setter for m_pActiveContext.
 
proto external UserActionContext GetActiveContext ()
 Getter for m_pActiveContext.
 
proto external bool CanBePerformed (IEntity user)
 Can this action be performed by the user?
 
proto external bool CanBeShown (IEntity user)
 Can this action be shown in the UI for the user?
 
proto external bool HasLocalEffectOnly ()
 Does this action only have client side effect?
 
proto external bool CanBroadcast ()
 If HasLocalEffectOnly() is false this method tells if the server is supposed to broadcast this action to clients.
 
proto external bool ShouldPerformPerFrame ()
 Should this action be performed every frame the input action is triggered?
 
proto external string GetActionName ()
 Return the name of this action.
 
proto external string GetActionDescription ()
 Return the description of this action.
 
proto external float GetVisibilityRange ()
 Returns the visibility range of this action in metres.
 
proto external void SetActionDuration (float duration)
 Sets the duration of this action in seconds.
 
proto external float GetActionDuration ()
 Returns the duration of this action in seconds.
 
proto external float GetActionProgress (float fProgress, float timeSlice)
 Returns the progress of this action in seconds.
 
proto external bool IsInProgress ()
 Returns true while continuous or timed action is being used.
 
proto external UIInfo GetUIInfo ()
 Returns the UIInfo set for this user action or null if none.
 
proto external IEntity GetOwner ()
 Returns the parent entity of this action.
 
proto external bool CanAggregate ()
 Whether action can be aggregated by name, this is a temp workaround for localization.
 
proto external int GetActionID ()
 Returns the ID with which this action is registered in its parent ActionsManagerComponent.
 
proto external void SetSendActionDataFlag ()
 Used to ask to send action data again during continuous action.
 
proto external ActionsManagerComponent GetActionsManager ()
 
proto external void SetActionEnabled_S (bool enable)
 Action can be enabled/disabled by the server. Disabled actions return false for CanBeShown(). Has no effect when called from the client.
 
proto external bool WasDisabledByServer ()
 Was the action disabled by the server?
 

Public Attributes

string ActionNameParams [9]
 Can be filled in scripts to be used as params when name is being formatted when displayed in UI.
 

Protected Member Functions

bool OnRplSave (ScriptBitWriter writer)
 
bool OnRplLoad (ScriptBitReader reader)
 
bool OnSaveActionData (ScriptBitWriter writer)
 Before performing the action the caller can store some data in it which is delivered to others.
 
bool OnLoadActionData (ScriptBitReader reader)
 If the one performing the action packed some data in it everybody receiving the action.
 
void OnActionSelected ()
 Callback for when action is selected by the local player and the local player ONLY.
 
void OnActionDeselected ()
 Callback for when action is deselected by the local player and the local player ONLY.
 

Protected Attributes

string m_sCannotPerformReason
 The reason why action cannot be performed.
 

Member Function Documentation

◆ CanAggregate()

proto external bool BaseUserAction.CanAggregate ( )

Whether action can be aggregated by name, this is a temp workaround for localization.

◆ CanBePerformed()

proto external bool BaseUserAction.CanBePerformed ( IEntity user)

Can this action be performed by the user?

◆ CanBeShown()

proto external bool BaseUserAction.CanBeShown ( IEntity user)

Can this action be shown in the UI for the user?

◆ CanBroadcast()

proto external bool BaseUserAction.CanBroadcast ( )

If HasLocalEffectOnly() is false this method tells if the server is supposed to broadcast this action to clients.

◆ GetActionDescription()

proto external string BaseUserAction.GetActionDescription ( )

Return the description of this action.

By default returns the value in UIInfo or empty string if UIInfo doesn't exist.

◆ GetActionDuration()

proto external float BaseUserAction.GetActionDuration ( )

Returns the duration of this action in seconds.

◆ GetActionID()

proto external int BaseUserAction.GetActionID ( )

Returns the ID with which this action is registered in its parent ActionsManagerComponent.

◆ GetActionName()

proto external string BaseUserAction.GetActionName ( )

Return the name of this action.

By default returns the value in UIInfo or empty string if UIInfo doesn't exist.

◆ GetActionProgress()

proto external float BaseUserAction.GetActionProgress ( float fProgress,
float timeSlice )

Returns the progress of this action in seconds.

◆ GetActionsManager()

proto external ActionsManagerComponent BaseUserAction.GetActionsManager ( )

◆ GetActiveContext()

proto external UserActionContext BaseUserAction.GetActiveContext ( )

Getter for m_pActiveContext.

◆ GetCannotPerformReason()

string BaseUserAction.GetCannotPerformReason ( )

Returns the reason why action couldn't be performed.

It is valid only within and after CanBePerformed is called

Implemented in SCR_DrainFuelUserAction.

◆ GetContextIndex()

proto external int BaseUserAction.GetContextIndex ( string sContextName)

Returns the index of the context this action is registered in as or -1 if none.

◆ GetOwner()

proto external IEntity BaseUserAction.GetOwner ( )

Returns the parent entity of this action.

◆ GetUIInfo()

proto external UIInfo BaseUserAction.GetUIInfo ( )

Returns the UIInfo set for this user action or null if none.

◆ GetVisibilityRange()

proto external float BaseUserAction.GetVisibilityRange ( )

Returns the visibility range of this action in metres.

◆ HasLocalEffectOnly()

proto external bool BaseUserAction.HasLocalEffectOnly ( )

Does this action only have client side effect?

◆ IsInProgress()

proto external bool BaseUserAction.IsInProgress ( )

Returns true while continuous or timed action is being used.

◆ OnActionDeselected()

void BaseUserAction.OnActionDeselected ( )
protected

Callback for when action is deselected by the local player and the local player ONLY.

Implemented in SCR_BaseUseSupportStationAction, and SCR_CatalogSpawnerUserAction.

◆ OnActionSelected()

void BaseUserAction.OnActionSelected ( )
protected

Callback for when action is selected by the local player and the local player ONLY.

Implemented in SCR_BaseUseSupportStationAction, SCR_CatalogSpawnerUserAction, and SCR_ScriptedUserAction.

◆ OnLoadActionData()

bool BaseUserAction.OnLoadActionData ( ScriptBitReader reader)
protected

If the one performing the action packed some data in it everybody receiving the action.

Only available for actions for which HasLocalEffectOnly returns false. Only triggered if the sender wrote anyting to the buffer.

Implemented in SCR_AdjustCollimatorElevationAction, SCR_AdjustShellChargeRingsAction, SCR_AdjustShellTimeFuzeAction, SCR_AdjustSignalAction, SCR_AdjustTimedFuzeAction, SCR_DeployCollimatorAction, SCR_MortarShootAction, and SCR_RippleFireIntervalAction.

◆ OnRplLoad()

bool BaseUserAction.OnRplLoad ( ScriptBitReader reader)
protected

◆ OnRplSave()

bool BaseUserAction.OnRplSave ( ScriptBitWriter writer)
protected

◆ OnSaveActionData()

bool BaseUserAction.OnSaveActionData ( ScriptBitWriter writer)
protected

Before performing the action the caller can store some data in it which is delivered to others.

Only available for actions for which HasLocalEffectOnly returns false.

Implemented in SCR_AdjustCollimatorElevationAction, SCR_AdjustShellChargeRingsAction, SCR_AdjustShellTimeFuzeAction, SCR_AdjustSignalAction, SCR_AdjustTimedFuzeAction, SCR_DeployCollimatorAction, SCR_MortarShootAction, and SCR_RippleFireIntervalAction.

◆ SetActionDuration()

proto external void BaseUserAction.SetActionDuration ( float duration)

Sets the duration of this action in seconds.

◆ SetActionEnabled_S()

proto external void BaseUserAction.SetActionEnabled_S ( bool enable)

Action can be enabled/disabled by the server. Disabled actions return false for CanBeShown(). Has no effect when called from the client.

◆ SetActiveContext()

proto external void BaseUserAction.SetActiveContext ( UserActionContext context)

Setter for m_pActiveContext.

◆ SetCannotPerformReason()

void BaseUserAction.SetCannotPerformReason ( string reason)

Sets the reason why action couldn't be performed.

Should be done in CanBePerformed check

◆ SetSendActionDataFlag()

proto external void BaseUserAction.SetSendActionDataFlag ( )

Used to ask to send action data again during continuous action.

◆ ShouldPerformPerFrame()

proto external bool BaseUserAction.ShouldPerformPerFrame ( )

Should this action be performed every frame the input action is triggered?

◆ WasDisabledByServer()

proto external bool BaseUserAction.WasDisabledByServer ( )

Was the action disabled by the server?

Member Data Documentation

◆ ActionNameParams

string BaseUserAction.ActionNameParams[9]

Can be filled in scripts to be used as params when name is being formatted when displayed in UI.

◆ m_sCannotPerformReason

string BaseUserAction.m_sCannotPerformReason
protected

The reason why action cannot be performed.

Should be set in CanBePerformed check


The documentation for this interface was generated from the following file: