Arma Reforger Script API
|
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 |
void SCR_PlayerController.ActionFocusToggle | ( | float | value = 0::0 , |
EActionTrigger | reason = 0 |
||
) |
TODO: Action listener methods should be protected.
void SCR_PlayerController.ActionFocusToggleUnarmed | ( | float | value = 0::0 , |
EActionTrigger | reason = 0 |
||
) |
void SCR_PlayerController.ActionFocusToggleVehicle | ( | float | value = 0::0 , |
EActionTrigger | reason = 0 |
||
) |
void SCR_PlayerController.ActionGesturePing | ( | float | value = 0::0 , |
EActionTrigger | reason = 0 |
||
) |
void SCR_PlayerController.ActionGesturePingHold | ( | float | value = 0::0 , |
EActionTrigger | reason = 0 |
||
) |
void SCR_PlayerController.ActionOpenInventory | ( | ) |
|
protected |
|
protected |
void SCR_PlayerController.DisconnectFromGame | ( | ) |
|
protected |
float SCR_PlayerController.GetFocusValue | ( | float | adsProgress = 0 , |
float | dt = -1 |
||
) |
Focus input degree for analogue input.
adsProgress | ADS focus percentage |
dt | Delta time |
bool SCR_PlayerController.GetGadgetFocus | ( | ) |
Automatic focusing while gadget is aimed down sights.
|
static |
Get entity controlled by player on this machine.
|
static |
Get faction of currently controlled local player entity.
|
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
|
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
|
static |
Returns either a valid ID of local player or 0.
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
OnOwnershipChangedInvoker SCR_PlayerController.GetOnOwnershipChangedInvoker | ( | ) |
bool SCR_PlayerController.IsPossessing | ( | ) |
Check if player is currently possessing an entity.
void SCR_PlayerController.OnAuthorsRequestFinished | ( | set< SCR_EditableEntityAuthor > | activeUGCAuthors | ) |
void SCR_PlayerController.OnBlockedListUpdated | ( | bool | success | ) |
void SCR_PlayerController.OnBlockedPlayerJoined | ( | int | playerID | ) |
override void SCR_PlayerController.OnControlledEntityChanged | ( | IEntity | from, |
IEntity | to | ||
) |
Runs every time the controlled entity has been changed.
Implements PlayerController.
override void SCR_PlayerController.OnDestroyed | ( | notnull Instigator | killer | ) |
Runs every time the controlled entity die.
Implements PlayerController.
void SCR_PlayerController.OnEndWalk | ( | ) |
|
protected |
Implements PlayerController.
void SCR_PlayerController.OnPlayerNameCacheUpdate | ( | bool | success | ) |
void SCR_PlayerController.OnPlayerRegistered | ( | SCR_EditorManagerEntity | managerEntity | ) |
|
protected |
override void SCR_PlayerController.OnUpdate | ( | float | timeSlice | ) |
Implements PlayerController.
void SCR_PlayerController.OnWalk | ( | ) |
|
protected |
void SCR_PlayerController.SetGadgetFocus | ( | bool | gadgetFocus | ) |
Automatic focusing while gadget is aimed down sights.
|
static |
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.
entity | is the subject entity |
|
protected |
|
protected |
bool SCR_PlayerController.SetPlatformImageTo | ( | int | playerID, |
notnull ImageWidget | image, | ||
ImageWidget | glow = null , |
||
bool | setVisible = true , |
||
bool | showOnPC = false , |
||
bool | showOnXbox = false |
||
) |
playerID | |
image | |
glowImage | |
set | image Visible |
show | on PC |
show | on Xbox |
bool SCR_PlayerController.SetPlatformImageToKind | ( | PlatformKind | targetPlatform, |
notnull ImageWidget | image, | ||
ImageWidget | glow = null , |
||
bool | setVisible = true , |
||
bool | showOnPC = false , |
||
bool | showOnXbox = false |
||
) |
platform | |
image | |
glowImage | |
set | image Visible |
show | on PC |
show | on Xbox |
|
protected |
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.
entity | Entity to be possessed, or null to return control back to the original player |
|
protected |
Update disabling of character controls in menus.
|
protected |
Find if this is local player controller. We assume that this never changes during scenario.
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
bool SCR_PlayerController.m_bRetain3PV |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
ref OnBeforePossessedInvoker SCR_PlayerController.m_OnBeforePossess = new OnBeforePossessedInvoker() |
ref OnControlledEntityChangedPlayerControllerInvoker SCR_PlayerController.m_OnControlledEntityChanged = new OnControlledEntityChangedPlayerControllerInvoker() |
ref OnDestroyedPlayerControllerInvoker SCR_PlayerController.m_OnDestroyed = new OnDestroyedPlayerControllerInvoker() |
ref OnOwnershipChangedInvoker SCR_PlayerController.m_OnOwnershipChangedInvoker = new OnOwnershipChangedInvoker() |
ref OnPossessedInvoker SCR_PlayerController.m_OnPossessed = new OnPossessedInvoker() |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
static |
|
staticprotected |