Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
SCR_PlayerController Interface Reference
Inheritance diagram for SCR_PlayerController:
[legend]

Public Member Functions

OnOwnershipChangedInvoker GetOnOwnershipChangedInvoker ()
 
void OnPlayerRegistered (SCR_EditorManagerEntity managerEntity)
 
void OnBlockedListUpdated (bool success)
 
void OnAuthorsRequestFinished (set< SCR_EditableEntityAuthor > activeUGCAuthors)
 
void OnPlayerNameCacheUpdate (bool success)
 
void DisconnectFromGame ()
 
void OnBlockedPlayerJoined (int playerID)
 
override void OnControlledEntityChanged (IEntity from, IEntity to)
 Runs every time the controlled entity has been changed.
 
void SetPossessedEntity (IEntity entity)
 Set entity which will be possessed by player.
 
void SetInitialMainEntity (notnull IEntity entity)
 Set intial main entity of a player, for a case where an existing entity should be assigned instead of spawning a new one.
 
bool IsPossessing ()
 Check if player is currently possessing an entity.
 
IEntity GetMainEntity ()
 Get player's main entity.
 
override void OnDestroyed (notnull Instigator killer)
 Runs every time the controlled entity die.
 
override void OnUpdate (float timeSlice)
 
float GetFocusValue (float adsProgress=0, float dt=-1)
 Focus input degree for analogue input.
 
void SetGadgetFocus (bool gadgetFocus)
 Automatic focusing while gadget is aimed down sights.
 
bool GetGadgetFocus ()
 Automatic focusing while gadget is aimed down sights.
 
void ActionFocusToggle (float value=0.0, EActionTrigger reason=0)
 TODO: Action listener methods should be protected.
 
void ActionFocusToggleVehicle (float value=0.0, EActionTrigger reason=0)
 
void ActionFocusToggleUnarmed (float value=0.0, EActionTrigger reason=0)
 
void OnWalk ()
 
void OnEndWalk ()
 
void ActionOpenInventory ()
 
void ActionGesturePing (float value=0.0, EActionTrigger reason=0)
 
void ActionGesturePingHold (float value=0.0, EActionTrigger reason=0)
 
bool SetPlatformImageTo (int playerID, notnull ImageWidget image, ImageWidget glow=null, bool setVisible=true, bool showOnPC=false, bool showOnXbox=false)
 
bool SetPlatformImageToKind (PlatformKind targetPlatform, notnull ImageWidget image, ImageWidget glow=null, bool setVisible=true, bool showOnPC=false, bool showOnXbox=false)
 
- Public Member Functions inherited from PlayerController
proto external IEntity GetControlledEntity ()
 
proto external bool SetControlledEntity (IEntity entity)
 Set the new controlled entity for the player.
 
proto external PlayerCamera GetPlayerCamera ()
 
proto external bool CanRequestRespawn ()
 When a PlayerController.RequestRespawn() is issued, the controller engages an internal lock that waits for response from the authority or timeout and drops any additional requests.
 
proto external void RequestRespawn ()
 Send request to the server to spawn a playable controller for us.
 
proto external ActionManager GetActionManager ()
 Returns the Action Manager associated to this player controller.
 
proto external RespawnComponent GetRespawnComponent ()
 Returns the RespawnComponent attached to this PlayerController or null if none.
 
proto external HUDManagerComponent GetHUDManagerComponent ()
 
proto external bool IsChatAllowed ()
 Returns text communication privilege.
 
proto external bool IsVonAllowed ()
 Returns voice communication privilege.
 
proto external bool HasRole (EPlayerRole role)
 Returns True if the user has given role assigned.
 
proto external bool SetCharacterCameraRenderActive (bool active)
 
proto external int GetPlayerId ()
 
proto external int GetRplIdentity ()
 
proto external void SetPlayerBlockedState (int playerId, bool blocked)
 Block specified player from any communication for the time of one gameplay session.
 
proto external void SetPlayerMutedState (int playerId, bool blocked)
 Block specified player from voice communication for the time of one gameplay session.
 
proto external PermissionState GetPlayerBlockedState (int playerId)
 Determine if the specified player is able to communicate with this PC in any means.
 
proto external PermissionState GetPlayerMutedState (int playerId)
 Determine if the specified player is able to communicate with this PC using voice.
 
proto external bool CanViewContentCreatedBy (int playerId)
 Determine if this PC can view content created by specified player.
 
proto external GamepadIOHandlerComponent GetGamepadIOHandlerComponent ()
 
proto external void ResetGamepadIOHandler ()
 
proto external void ApplyGamepadEffectImmediate (GamepadEffect effect)
 
void OnUpdate (float timeSlice)
 

Static Public Member Functions

static void SetGameUserSettings ()
 
static int GetLocalPlayerId ()
 Returns either a valid ID of local player or 0.
 
static IEntity GetLocalControlledEntity ()
 Get entity controlled by player on this machine.
 
static IEntity GetLocalMainEntity ()
 Get player's main entity on this machine.
 
static Faction GetLocalControlledEntityFaction ()
 Get faction of currently controlled local player entity.
 
static Faction GetLocalMainEntityFaction ()
 Get faction of local player's main entity.
 

Public Attributes

bool m_bRetain3PV
 
ref OnBeforePossessedInvoker m_OnBeforePossess = new OnBeforePossessedInvoker()
 
ref OnPossessedInvoker m_OnPossessed = new OnPossessedInvoker()
 
ref OnControlledEntityChangedPlayerControllerInvoker m_OnControlledEntityChanged = new OnControlledEntityChangedPlayerControllerInvoker()
 
ref OnDestroyedPlayerControllerInvoker m_OnDestroyed = new OnDestroyedPlayerControllerInvoker()
 
ref OnOwnershipChangedInvoker m_OnOwnershipChangedInvoker = new OnOwnershipChangedInvoker()
 

Static Public Attributes

static PlayerController s_pLocalPlayerController
 

Protected Member Functions

override void OnOwnershipChanged (bool changing, bool becameOwner)
 
void OnRplMainEntityFromID ()
 
void SetAIActivation (IEntity entity, bool activate)
 
void UpdateLocalPlayerController ()
 Find if this is local player controller. We assume that this never changes during scenario.
 
void UpdateControls ()
 Update disabling of character controls in menus.
 
void UpdateUI ()
 
void ChangeMagnification (float value)
 
void ChangeWeaponOptics ()
 
SCR_CharacterControllerComponent GetCharacterController ()
 
void SetPlatformImagePSN (PlatformKind targetPlatformKind, notnull ImageWidget image, ImageWidget glow=null, bool setVisible=true)
 
void SetPlatformImagePC (PlatformKind targetPlatformKind, notnull ImageWidget image, ImageWidget glow=null, bool setVisible=true)
 
void SetPlatformImageXbox (PlatformKind targetPlatformKind, notnull ImageWidget image, ImageWidget glow=null, bool setVisible=true)
 
- Protected Member Functions inherited from PlayerController
void OnInit (IEntity owner)
 
void OnOwnershipChanged (bool changing, bool becameOwner)
 
void OnControlledEntityChanged (IEntity from, IEntity to)
 Runs every time the controlled entity has been changed.
 
void OnDestroyed (notnull Instigator killer)
 Runs every time the controlled entity die.
 

Protected Attributes

CharacterControllerComponent m_CharacterController
 
bool m_bIsLocalPlayerController
 
bool m_bIsPaused
 
bool m_bGadgetFocus
 
SCR_EFocusToggleMode m_eFocusToggle
 
float m_fCharacterSpeed
 
RplId m_MainEntityID
 
IEntity m_MainEntity
 
bool m_bIsPossessing
 

Static Protected Attributes

static const float WALK_SPEED = 0.5
 
static const float FOCUS_ACTIVATION = 0.1
 
static const float FOCUS_DEACTIVATION = 0.05
 
static const float FOCUS_TIMEOUT = 0.3
 
static const float FOCUS_TOLERANCE = 0.005
 
static const float FOCUS_ANALOGUE_SCALE = 3.0
 
static float s_fADSFocus = 0.5
 
static float s_fPIPFocus = 1
 
static float s_fFocusTimeout
 
static float s_fFocusAnalogue
 
static bool s_bWasADS
 

Detailed Description

Examples
d:/jenkins/workspace/ar_data_branches_stable_1.2.1/A4Data/scripts/Game/GameMode/SCR_GameModeEditor.c.

Member Function Documentation

◆ ActionFocusToggle()

void SCR_PlayerController.ActionFocusToggle ( float  value = 0::0,
EActionTrigger  reason = 0 
)

TODO: Action listener methods should be protected.

◆ ActionFocusToggleUnarmed()

void SCR_PlayerController.ActionFocusToggleUnarmed ( float  value = 0::0,
EActionTrigger  reason = 0 
)

◆ ActionFocusToggleVehicle()

void SCR_PlayerController.ActionFocusToggleVehicle ( float  value = 0::0,
EActionTrigger  reason = 0 
)

◆ ActionGesturePing()

void SCR_PlayerController.ActionGesturePing ( float  value = 0::0,
EActionTrigger  reason = 0 
)

◆ ActionGesturePingHold()

void SCR_PlayerController.ActionGesturePingHold ( float  value = 0::0,
EActionTrigger  reason = 0 
)

◆ ActionOpenInventory()

void SCR_PlayerController.ActionOpenInventory ( )

◆ ChangeMagnification()

void SCR_PlayerController.ChangeMagnification ( float  value)
protected

◆ ChangeWeaponOptics()

void SCR_PlayerController.ChangeWeaponOptics ( )
protected

◆ DisconnectFromGame()

void SCR_PlayerController.DisconnectFromGame ( )

◆ GetCharacterController()

SCR_CharacterControllerComponent SCR_PlayerController.GetCharacterController ( )
protected

◆ GetFocusValue()

float SCR_PlayerController.GetFocusValue ( float  adsProgress = 0,
float  dt = -1 
)

Focus input degree for analogue input.

Parameters
adsProgressADS focus percentage
dtDelta time
Returns
focus Amount of focus between 0 and 1

◆ GetGadgetFocus()

bool SCR_PlayerController.GetGadgetFocus ( )

Automatic focusing while gadget is aimed down sights.

◆ GetLocalControlledEntity()

static IEntity SCR_PlayerController.GetLocalControlledEntity ( )
static

Get entity controlled by player on this machine.

Returns
Controlled entity

◆ GetLocalControlledEntityFaction()

static Faction SCR_PlayerController.GetLocalControlledEntityFaction ( )
static

Get faction of currently controlled local player entity.

Returns
Faction

◆ GetLocalMainEntity()

static IEntity SCR_PlayerController.GetLocalMainEntity ( )
static

Get player's main entity on this machine.

When not possessing, this will be the same as GetControlledEntity() When possessing, this will be player's main entity which was controlled before possessing started

Returns
Main player entity

◆ GetLocalMainEntityFaction()

static Faction SCR_PlayerController.GetLocalMainEntityFaction ( )
static

Get faction of local player's main entity.

When not possessing, the entity will be the same as GetControlledEntity() When possessing, the entity will be player's main entity which was controlled before possessing started

Returns
Faction

◆ GetLocalPlayerId()

static int SCR_PlayerController.GetLocalPlayerId ( )
static

◆ GetMainEntity()

IEntity SCR_PlayerController.GetMainEntity ( )

Get player's main entity.

When not possessing, this will be the same as GetControlledEntity() When possessing, this will be player's main entity which was controlled before possessing started

Returns
Main player entity

◆ GetOnOwnershipChangedInvoker()

OnOwnershipChangedInvoker SCR_PlayerController.GetOnOwnershipChangedInvoker ( )
See also
PlayerController.OnOwnershipChanged for more information.

◆ IsPossessing()

bool SCR_PlayerController.IsPossessing ( )

Check if player is currently possessing an entity.

Returns
True when possessing
Examples
d:/jenkins/workspace/ar_data_branches_stable_1.2.1/A4Data/scripts/Game/GameMode/SCR_GameModeEditor.c.

◆ OnAuthorsRequestFinished()

void SCR_PlayerController.OnAuthorsRequestFinished ( set< SCR_EditableEntityAuthor activeUGCAuthors)

◆ OnBlockedListUpdated()

void SCR_PlayerController.OnBlockedListUpdated ( bool  success)

◆ OnBlockedPlayerJoined()

void SCR_PlayerController.OnBlockedPlayerJoined ( int  playerID)

◆ OnControlledEntityChanged()

override void SCR_PlayerController.OnControlledEntityChanged ( IEntity  from,
IEntity  to 
)

Runs every time the controlled entity has been changed.

Implements PlayerController.

◆ OnDestroyed()

override void SCR_PlayerController.OnDestroyed ( notnull Instigator  killer)

Runs every time the controlled entity die.

Implements PlayerController.

◆ OnEndWalk()

void SCR_PlayerController.OnEndWalk ( )

◆ OnOwnershipChanged()

override void SCR_PlayerController.OnOwnershipChanged ( bool  changing,
bool  becameOwner 
)
protected
See also
PlayerController.OnOwnershipChanged for more information.

Implements PlayerController.

◆ OnPlayerNameCacheUpdate()

void SCR_PlayerController.OnPlayerNameCacheUpdate ( bool  success)

◆ OnPlayerRegistered()

void SCR_PlayerController.OnPlayerRegistered ( SCR_EditorManagerEntity  managerEntity)

◆ OnRplMainEntityFromID()

void SCR_PlayerController.OnRplMainEntityFromID ( )
protected

◆ OnUpdate()

override void SCR_PlayerController.OnUpdate ( float  timeSlice)

Implements PlayerController.

◆ OnWalk()

void SCR_PlayerController.OnWalk ( )

◆ SetAIActivation()

void SCR_PlayerController.SetAIActivation ( IEntity  entity,
bool  activate 
)
protected

◆ SetGadgetFocus()

void SCR_PlayerController.SetGadgetFocus ( bool  gadgetFocus)

Automatic focusing while gadget is aimed down sights.

◆ SetGameUserSettings()

static void SCR_PlayerController.SetGameUserSettings ( )
static

◆ SetInitialMainEntity()

void SCR_PlayerController.SetInitialMainEntity ( notnull IEntity  entity)

Set intial main entity of a player, for a case where an existing entity should be assigned instead of spawning a new one.

Parameters
entityis the subject entity

◆ SetPlatformImagePC()

void SCR_PlayerController.SetPlatformImagePC ( PlatformKind  targetPlatformKind,
notnull ImageWidget  image,
ImageWidget  glow = null,
bool  setVisible = true 
)
protected

◆ SetPlatformImagePSN()

void SCR_PlayerController.SetPlatformImagePSN ( PlatformKind  targetPlatformKind,
notnull ImageWidget  image,
ImageWidget  glow = null,
bool  setVisible = true 
)
protected

◆ SetPlatformImageTo()

bool SCR_PlayerController.SetPlatformImageTo ( int  playerID,
notnull ImageWidget  image,
ImageWidget  glow = null,
bool  setVisible = true,
bool  showOnPC = false,
bool  showOnXbox = false 
)
Parameters
playerID
image
glowImage
setimage Visible
showon PC
showon Xbox

◆ SetPlatformImageToKind()

bool SCR_PlayerController.SetPlatformImageToKind ( PlatformKind  targetPlatform,
notnull ImageWidget  image,
ImageWidget  glow = null,
bool  setVisible = true,
bool  showOnPC = false,
bool  showOnXbox = false 
)
Parameters
platform
image
glowImage
setimage Visible
showon PC
showon Xbox

◆ SetPlatformImageXbox()

void SCR_PlayerController.SetPlatformImageXbox ( PlatformKind  targetPlatformKind,
notnull ImageWidget  image,
ImageWidget  glow = null,
bool  setVisible = true 
)
protected

◆ SetPossessedEntity()

void SCR_PlayerController.SetPossessedEntity ( IEntity  entity)

Set entity which will be possessed by player.

Possed entity is controlled by player, but it's not the player.

Parameters
entityEntity to be possessed, or null to return control back to the original player

◆ UpdateControls()

void SCR_PlayerController.UpdateControls ( )
protected

Update disabling of character controls in menus.

◆ UpdateLocalPlayerController()

void SCR_PlayerController.UpdateLocalPlayerController ( )
protected

Find if this is local player controller. We assume that this never changes during scenario.

◆ UpdateUI()

void SCR_PlayerController.UpdateUI ( )
protected

Member Data Documentation

◆ FOCUS_ACTIVATION

const float SCR_PlayerController.FOCUS_ACTIVATION = 0.1
staticprotected

◆ FOCUS_ANALOGUE_SCALE

const float SCR_PlayerController.FOCUS_ANALOGUE_SCALE = 3.0
staticprotected

◆ FOCUS_DEACTIVATION

const float SCR_PlayerController.FOCUS_DEACTIVATION = 0.05
staticprotected

◆ FOCUS_TIMEOUT

const float SCR_PlayerController.FOCUS_TIMEOUT = 0.3
staticprotected

◆ FOCUS_TOLERANCE

const float SCR_PlayerController.FOCUS_TOLERANCE = 0.005
staticprotected

◆ m_bGadgetFocus

bool SCR_PlayerController.m_bGadgetFocus
protected

◆ m_bIsLocalPlayerController

bool SCR_PlayerController.m_bIsLocalPlayerController
protected

◆ m_bIsPaused

bool SCR_PlayerController.m_bIsPaused
protected

◆ m_bIsPossessing

bool SCR_PlayerController.m_bIsPossessing
protected

◆ m_bRetain3PV

bool SCR_PlayerController.m_bRetain3PV

◆ m_CharacterController

CharacterControllerComponent SCR_PlayerController.m_CharacterController
protected

◆ m_eFocusToggle

SCR_EFocusToggleMode SCR_PlayerController.m_eFocusToggle
protected

◆ m_fCharacterSpeed

float SCR_PlayerController.m_fCharacterSpeed
protected

◆ m_MainEntity

IEntity SCR_PlayerController.m_MainEntity
protected

◆ m_MainEntityID

RplId SCR_PlayerController.m_MainEntityID
protected

◆ m_OnBeforePossess

ref OnBeforePossessedInvoker SCR_PlayerController.m_OnBeforePossess = new OnBeforePossessedInvoker()

◆ m_OnControlledEntityChanged

ref OnControlledEntityChangedPlayerControllerInvoker SCR_PlayerController.m_OnControlledEntityChanged = new OnControlledEntityChangedPlayerControllerInvoker()

◆ m_OnDestroyed

ref OnDestroyedPlayerControllerInvoker SCR_PlayerController.m_OnDestroyed = new OnDestroyedPlayerControllerInvoker()

◆ m_OnOwnershipChangedInvoker

ref OnOwnershipChangedInvoker SCR_PlayerController.m_OnOwnershipChangedInvoker = new OnOwnershipChangedInvoker()

◆ m_OnPossessed

ref OnPossessedInvoker SCR_PlayerController.m_OnPossessed = new OnPossessedInvoker()

◆ s_bWasADS

bool SCR_PlayerController.s_bWasADS
staticprotected

◆ s_fADSFocus

float SCR_PlayerController.s_fADSFocus = 0.5
staticprotected

◆ s_fFocusAnalogue

float SCR_PlayerController.s_fFocusAnalogue
staticprotected

◆ s_fFocusTimeout

float SCR_PlayerController.s_fFocusTimeout
staticprotected

◆ s_fPIPFocus

float SCR_PlayerController.s_fPIPFocus = 1
staticprotected

◆ s_pLocalPlayerController

PlayerController SCR_PlayerController.s_pLocalPlayerController
static

◆ WALK_SPEED

const float SCR_PlayerController.WALK_SPEED = 0.5
staticprotected

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