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

Public Member Functions

void OpenCommandingMenu ()
 
void SetupMapListener ()
 
void RemoveMapListener ()
 
void SetupPlayerRadialMenu ()
 
void OnMapOpen (MapConfiguration config)
 
void OnMapClose (MapConfiguration config)
 
void SetupMapRadialMenu ()
 
void OnMapCommandPerformed (SCR_SelectionMenuEntry element, float[] worldPos)
 
void OnGroupLeaderChanged (int groupID, int playerID)
 
void OnGroupChanged (int groupID)
 
void HideCommandPreview ()
 Hide command preview.
 
void ShowCommandPreview (string commandName)
 Prepare the command to be shown.
 
void OnRadialMenuOpenFailed (SCR_SelectionMenu menu, SCR_ESelectionMenuFailReason reason)
 
void PrepareExecuteCommand (string commandName, vector targetPosition="0 0 0")
 
void ExecuteCommand (vector targetPosition, IEntity tracedEntity)
 
void RPC_RequestExecuteCommand (int commandIndex, RplId cursorTargetID, RplId groupRplID, vector targetPoisition, int playerID)
 
void CommandExecutedCallback (int commandIndex)
 
void RPC_CommandExecutedCallback (int commandIndex)
 
void PlayCommandGesture (int commandIndex)
 
void UpdateRadialMenu (IEntity owner, bool isOpen)
 
void AddElementsFromCategory (SCR_PlayerCommandingMenuCategoryElement category, SCR_SelectionMenuCategoryEntry rootCategory=null)
 
void AddElementsFromCategoryToMap (notnull SCR_PlayerCommandingMenuCategoryElement category, SCR_SelectionMenuCategoryEntry rootCategory=null)
 
void InsertElementToMapRadial (SCR_PlayerCommandingMenuBaseElement element, notnull SCR_PlayerCommandingMenuCategoryElement category, SCR_SelectionMenuCategoryEntry mapCategory)
 
SCR_SelectionMenuEntry AddRadialMenuElement (SCR_PlayerCommandingMenuBaseElement newElement, SCR_SelectionMenuCategoryEntry parentCategory=null)
 
SCR_SelectionMenuEntry AddCategoryElement (SCR_PlayerCommandingMenuCategoryElement category, SCR_SelectionMenuCategoryEntry parentCategory=null)
 
SCR_SelectionMenuEntry AddCommandElement (SCR_PlayerCommandingMenuCommand command, SCR_SelectionMenuCategoryEntry parentCategory=null)
 
void OnPlayerRadialMenuOpen ()
 
void OnPlayerRadialMenuClose ()
 
void OnQuickslotBind4 ()
 
void OnQuickslotBind5 ()
 
void OnQuickslotBind6 ()
 
void OnQuickslotBind7 ()
 
void OnQuickslotBind8 ()
 
void OnQuickslotBind9 ()
 
void BindToQuickslot (int slotIndex)
 
bool IsOpened ()
 
bool IsCommandSelected ()
 
void SetShownCommand (SCR_InfoDisplayExtended infoDisplay)
 
void SetShownCommandPreview (SCR_InfoDisplayExtended infoDisplay)
 
void DrawWaypointVisualization (vector targetPosition, float wpRadius, bool deletePrevious=true)
 

Static Public Member Functions

static SCR_PlayerControllerCommandingComponent GetPlayerControllerCommandingComponent (int playerID)
 
static SCR_PlayerControllerCommandingComponent GetLocalPlayerControllerCommandingComponent ()
 

Protected Member Functions

override void OnPostInit (IEntity owner)
 
void OnControllerTakeControl (SCR_RadialMenuController controller)
 
void OnControllerLostControl (SCR_RadialMenuController controller, bool hasControl)
 
void RemoveListenersFromRadial ()
 
void DeleteShownCommand ()
 If a command is currently being displayed, hide/delete it.
 
bool GetWorldToScreenPosition (BaseWorld world, vector worldPosition, out float posX, out float posY, int cameraIndex=-1)
 Recalculates worldPosition to screen space.
 
void PhysicsCommandTrace (float range=COMMANDING_VISUAL_RANGE)
 Perform a TraceSegmented starting from Camera position in camera look direction with givin lengh.
 
void OnRadialMenuSelected (SCR_SelectionMenu menu, SCR_SelectionMenuEntry entry)
 
void OnRadialMenuPerformed (SCR_SelectionMenu menu, SCR_SelectionMenuEntry entry)
 

Protected Attributes

ResourceName m_sCommandingConfigActionPair
 
ResourceName m_sCommandingMapMenuConfigPath
 
ref SCR_RadialMenuController m_RadialMenuController
 
SCR_RadialMenu m_RadialMenu
 
ref SCR_PlayerCommandingMenuConfig m_CommandingMapMenuConfig
 
ref SCR_PlayerCommandingMenuConfig m_CommandingMenuConfig
 
ref SCR_PlayerCommandingMenuActionsSetup m_CommandingMenuPairsConfig
 
IEntity m_SelectedEntity
 
SCR_CommandingManagerComponent m_CommandingManager
 
SCR_MapRadialUI m_MapContextualMenu
 
SCR_InfoDisplayExtended m_CurrentShownCommand
 
SCR_InfoDisplayExtended m_CurrentShownCommandPreview
 
string m_sExecutedCommandName
 
ref array< ref Shape > m_aShapes = {}
 
bool m_bIsCommandExecuting = false
 
bool m_bSlaveGroupRequested = false
 
bool m_bIsCommandSelected
 
ref SCR_PhysicsHelper m_PhysicsHelper
 
string m_sSelectedCommandEntry
 

Static Protected Attributes

static const float ABOVE_TERRAIN_OFFSET = 0.5
 Used to offset the position to spawn waypoint so it is not spawned in terrain.
 
static const float COMMANDING_VISUAL_RANGE = 10000
 Maximal range for command in meters.
 

Member Function Documentation

◆ AddCategoryElement()

SCR_SelectionMenuEntry SCR_PlayerControllerCommandingComponent.AddCategoryElement ( SCR_PlayerCommandingMenuCategoryElement  category,
SCR_SelectionMenuCategoryEntry  parentCategory = null 
)
Parameters
[in]categorycannot be null
[in]parentCategory
Returns

◆ AddCommandElement()

SCR_SelectionMenuEntry SCR_PlayerControllerCommandingComponent.AddCommandElement ( SCR_PlayerCommandingMenuCommand  command,
SCR_SelectionMenuCategoryEntry  parentCategory = null 
)
Parameters
[in]commandcannot be null
[in]parentCategory
Returns

◆ AddElementsFromCategory()

void SCR_PlayerControllerCommandingComponent.AddElementsFromCategory ( SCR_PlayerCommandingMenuCategoryElement  category,
SCR_SelectionMenuCategoryEntry  rootCategory = null 
)
Parameters
[in]categorycannot be null
[in]rootCategory

◆ AddElementsFromCategoryToMap()

void SCR_PlayerControllerCommandingComponent.AddElementsFromCategoryToMap ( notnull SCR_PlayerCommandingMenuCategoryElement  category,
SCR_SelectionMenuCategoryEntry  rootCategory = null 
)
Parameters
[in]categorycannot be null

◆ AddRadialMenuElement()

SCR_SelectionMenuEntry SCR_PlayerControllerCommandingComponent.AddRadialMenuElement ( SCR_PlayerCommandingMenuBaseElement  newElement,
SCR_SelectionMenuCategoryEntry  parentCategory = null 
)
Parameters
[in]newElement
[in]parentCategory
Returns

◆ BindToQuickslot()

void SCR_PlayerControllerCommandingComponent.BindToQuickslot ( int  slotIndex)

◆ CommandExecutedCallback()

void SCR_PlayerControllerCommandingComponent.CommandExecutedCallback ( int  commandIndex)
Parameters
[in]commandIndex

◆ DeleteShownCommand()

void SCR_PlayerControllerCommandingComponent.DeleteShownCommand ( )
protected

If a command is currently being displayed, hide/delete it.

◆ DrawWaypointVisualization()

void SCR_PlayerControllerCommandingComponent.DrawWaypointVisualization ( vector  targetPosition,
float  wpRadius,
bool  deletePrevious = true 
)

◆ ExecuteCommand()

void SCR_PlayerControllerCommandingComponent.ExecuteCommand ( vector  targetPosition,
IEntity  tracedEntity 
)
Parameters
[in]targetPosition
[in]tracedEntity

◆ GetLocalPlayerControllerCommandingComponent()

static SCR_PlayerControllerCommandingComponent SCR_PlayerControllerCommandingComponent.GetLocalPlayerControllerCommandingComponent ( )
static
Returns

◆ GetPlayerControllerCommandingComponent()

static SCR_PlayerControllerCommandingComponent SCR_PlayerControllerCommandingComponent.GetPlayerControllerCommandingComponent ( int  playerID)
static
Parameters
[in]playerID
Returns

◆ GetWorldToScreenPosition()

bool SCR_PlayerControllerCommandingComponent.GetWorldToScreenPosition ( BaseWorld  world,
vector  worldPosition,
out float  posX,
out float  posY,
int  cameraIndex = -1 
)
protected

Recalculates worldPosition to screen space.

Parameters
[in]world
[in]worldPosition
[out]posXX Position on the screen
[out]posYY Position on the screen
[in]intCamera thats being used

◆ HideCommandPreview()

void SCR_PlayerControllerCommandingComponent.HideCommandPreview ( )

Hide command preview.

◆ InsertElementToMapRadial()

void SCR_PlayerControllerCommandingComponent.InsertElementToMapRadial ( SCR_PlayerCommandingMenuBaseElement  element,
notnull SCR_PlayerCommandingMenuCategoryElement  category,
SCR_SelectionMenuCategoryEntry  mapCategory 
)
Parameters
[in]elementcannot be null
[in]category
[in]mapCategory

◆ IsCommandSelected()

bool SCR_PlayerControllerCommandingComponent.IsCommandSelected ( )

◆ IsOpened()

bool SCR_PlayerControllerCommandingComponent.IsOpened ( )

◆ OnControllerLostControl()

void SCR_PlayerControllerCommandingComponent.OnControllerLostControl ( SCR_RadialMenuController  controller,
bool  hasControl 
)
protected

◆ OnControllerTakeControl()

void SCR_PlayerControllerCommandingComponent.OnControllerTakeControl ( SCR_RadialMenuController  controller)
protected

◆ OnGroupChanged()

void SCR_PlayerControllerCommandingComponent.OnGroupChanged ( int  groupID)
Parameters
[in]groupID

◆ OnGroupLeaderChanged()

void SCR_PlayerControllerCommandingComponent.OnGroupLeaderChanged ( int  groupID,
int  playerID 
)
Parameters
[in]groupID
[in]playerID

◆ OnMapClose()

void SCR_PlayerControllerCommandingComponent.OnMapClose ( MapConfiguration  config)
Parameters
[in]config

◆ OnMapCommandPerformed()

void SCR_PlayerControllerCommandingComponent.OnMapCommandPerformed ( SCR_SelectionMenuEntry  element,
float[]  worldPos 
)
Parameters
[in]element
[in]worldPos

◆ OnMapOpen()

void SCR_PlayerControllerCommandingComponent.OnMapOpen ( MapConfiguration  config)
Parameters
[in]config

◆ OnPlayerRadialMenuClose()

void SCR_PlayerControllerCommandingComponent.OnPlayerRadialMenuClose ( )

◆ OnPlayerRadialMenuOpen()

void SCR_PlayerControllerCommandingComponent.OnPlayerRadialMenuOpen ( )

◆ OnPostInit()

override void SCR_PlayerControllerCommandingComponent.OnPostInit ( IEntity  owner)
protected

◆ OnQuickslotBind4()

void SCR_PlayerControllerCommandingComponent.OnQuickslotBind4 ( )

◆ OnQuickslotBind5()

void SCR_PlayerControllerCommandingComponent.OnQuickslotBind5 ( )

◆ OnQuickslotBind6()

void SCR_PlayerControllerCommandingComponent.OnQuickslotBind6 ( )

◆ OnQuickslotBind7()

void SCR_PlayerControllerCommandingComponent.OnQuickslotBind7 ( )

◆ OnQuickslotBind8()

void SCR_PlayerControllerCommandingComponent.OnQuickslotBind8 ( )

◆ OnQuickslotBind9()

void SCR_PlayerControllerCommandingComponent.OnQuickslotBind9 ( )

◆ OnRadialMenuOpenFailed()

void SCR_PlayerControllerCommandingComponent.OnRadialMenuOpenFailed ( SCR_SelectionMenu  menu,
SCR_ESelectionMenuFailReason  reason 
)

◆ OnRadialMenuPerformed()

void SCR_PlayerControllerCommandingComponent.OnRadialMenuPerformed ( SCR_SelectionMenu  menu,
SCR_SelectionMenuEntry  entry 
)
protected
Parameters
[in]menu
[in]entry

◆ OnRadialMenuSelected()

void SCR_PlayerControllerCommandingComponent.OnRadialMenuSelected ( SCR_SelectionMenu  menu,
SCR_SelectionMenuEntry  entry 
)
protected
Parameters
[in]menu
[in]entry

◆ OpenCommandingMenu()

void SCR_PlayerControllerCommandingComponent.OpenCommandingMenu ( )

◆ PhysicsCommandTrace()

void SCR_PlayerControllerCommandingComponent.PhysicsCommandTrace ( float  range = COMMANDING_VISUAL_RANGE)
protected

Perform a TraceSegmented starting from Camera position in camera look direction with givin lengh.

Parameters
[in]float,rangein meters

◆ PlayCommandGesture()

void SCR_PlayerControllerCommandingComponent.PlayCommandGesture ( int  commandIndex)
Parameters
[in]commandIndex

◆ PrepareExecuteCommand()

void SCR_PlayerControllerCommandingComponent.PrepareExecuteCommand ( string  commandName,
vector  targetPosition = "0 0 0" 
)
Parameters
[in]commandName

◆ RemoveListenersFromRadial()

void SCR_PlayerControllerCommandingComponent.RemoveListenersFromRadial ( )
protected

◆ RemoveMapListener()

void SCR_PlayerControllerCommandingComponent.RemoveMapListener ( )

◆ RPC_CommandExecutedCallback()

void SCR_PlayerControllerCommandingComponent.RPC_CommandExecutedCallback ( int  commandIndex)
Parameters
[in]commandIndex

◆ RPC_RequestExecuteCommand()

void SCR_PlayerControllerCommandingComponent.RPC_RequestExecuteCommand ( int  commandIndex,
RplId  cursorTargetID,
RplId  groupRplID,
vector  targetPoisition,
int  playerID 
)
Parameters
[in]commandIndex
[in]cursorTargetID
[in]groupRplID
[in]targetPoisition
[in]playerID

◆ SetShownCommand()

void SCR_PlayerControllerCommandingComponent.SetShownCommand ( SCR_InfoDisplayExtended  infoDisplay)

◆ SetShownCommandPreview()

void SCR_PlayerControllerCommandingComponent.SetShownCommandPreview ( SCR_InfoDisplayExtended  infoDisplay)

◆ SetupMapListener()

void SCR_PlayerControllerCommandingComponent.SetupMapListener ( )

◆ SetupMapRadialMenu()

void SCR_PlayerControllerCommandingComponent.SetupMapRadialMenu ( )

◆ SetupPlayerRadialMenu()

void SCR_PlayerControllerCommandingComponent.SetupPlayerRadialMenu ( )

◆ ShowCommandPreview()

void SCR_PlayerControllerCommandingComponent.ShowCommandPreview ( string  commandName)

Prepare the command to be shown.

Parameters
[in]commandname

◆ UpdateRadialMenu()

void SCR_PlayerControllerCommandingComponent.UpdateRadialMenu ( IEntity  owner,
bool  isOpen 
)
Parameters
[in]owner
[in]isOpen

Member Data Documentation

◆ ABOVE_TERRAIN_OFFSET

const float SCR_PlayerControllerCommandingComponent.ABOVE_TERRAIN_OFFSET = 0.5
staticprotected

Used to offset the position to spawn waypoint so it is not spawned in terrain.

◆ COMMANDING_VISUAL_RANGE

const float SCR_PlayerControllerCommandingComponent.COMMANDING_VISUAL_RANGE = 10000
staticprotected

Maximal range for command in meters.

◆ m_aShapes

ref array<ref Shape> SCR_PlayerControllerCommandingComponent.m_aShapes = {}
protected

◆ m_bIsCommandExecuting

bool SCR_PlayerControllerCommandingComponent.m_bIsCommandExecuting = false
protected

◆ m_bIsCommandSelected

bool SCR_PlayerControllerCommandingComponent.m_bIsCommandSelected
protected

◆ m_bSlaveGroupRequested

bool SCR_PlayerControllerCommandingComponent.m_bSlaveGroupRequested = false
protected

◆ m_CommandingManager

SCR_CommandingManagerComponent SCR_PlayerControllerCommandingComponent.m_CommandingManager
protected

◆ m_CommandingMapMenuConfig

ref SCR_PlayerCommandingMenuConfig SCR_PlayerControllerCommandingComponent.m_CommandingMapMenuConfig
protected

◆ m_CommandingMenuConfig

ref SCR_PlayerCommandingMenuConfig SCR_PlayerControllerCommandingComponent.m_CommandingMenuConfig
protected

◆ m_CommandingMenuPairsConfig

ref SCR_PlayerCommandingMenuActionsSetup SCR_PlayerControllerCommandingComponent.m_CommandingMenuPairsConfig
protected

◆ m_CurrentShownCommand

SCR_InfoDisplayExtended SCR_PlayerControllerCommandingComponent.m_CurrentShownCommand
protected

◆ m_CurrentShownCommandPreview

SCR_InfoDisplayExtended SCR_PlayerControllerCommandingComponent.m_CurrentShownCommandPreview
protected

◆ m_MapContextualMenu

SCR_MapRadialUI SCR_PlayerControllerCommandingComponent.m_MapContextualMenu
protected

◆ m_PhysicsHelper

ref SCR_PhysicsHelper SCR_PlayerControllerCommandingComponent.m_PhysicsHelper
protected

◆ m_RadialMenu

SCR_RadialMenu SCR_PlayerControllerCommandingComponent.m_RadialMenu
protected

◆ m_RadialMenuController

ref SCR_RadialMenuController SCR_PlayerControllerCommandingComponent.m_RadialMenuController
protected

◆ m_sCommandingConfigActionPair

ResourceName SCR_PlayerControllerCommandingComponent.m_sCommandingConfigActionPair
protected

◆ m_sCommandingMapMenuConfigPath

ResourceName SCR_PlayerControllerCommandingComponent.m_sCommandingMapMenuConfigPath
protected

◆ m_SelectedEntity

IEntity SCR_PlayerControllerCommandingComponent.m_SelectedEntity
protected

◆ m_sExecutedCommandName

string SCR_PlayerControllerCommandingComponent.m_sExecutedCommandName
protected

◆ m_sSelectedCommandEntry

string SCR_PlayerControllerCommandingComponent.m_sSelectedCommandEntry
protected

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