Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
SCR_CampaignSuppliesComponent Interface Reference

Makes a vehicle able to carry Conflict resources. More...

Inheritance diagram for SCR_CampaignSuppliesComponent:
[legend]

Public Member Functions

int GetLoadingPlayer (bool unloading=false)
 
void SetSupplyLoadingPlayer (int playerID)
 Setter for Loading players array.
 
void DeleteSupplyLoadingPlayer (int playerID)
 
void SetSupplyUnloadingPlayer (int playerID)
 Setter for Unloading players array.
 
void DeleteSupplyUnloadingPlayer (int playerID)
 Deletes from Unloading players array.
 
void OnSuppliesChanged ()
 
int GetSupplies ()
 
int GetSuppliesMax ()
 
void SetSuppliesMax (int suppliesMax)
 
float GetOperationalRadius ()
 Get the load / unload radius.
 
void SetIsPlayerInRange (bool status)
 
bool GetIsPlayerInRange ()
 
void SetLastLoadedAt (SCR_CampaignMilitaryBaseComponent base)
 
void SetLastUnloadedAt (SCR_CampaignMilitaryBaseComponent base)
 
bool AwardXP ()
 
void AddSupplies (int supplies, bool replicate=true)
 
bool GetIsStandaloneDepot ()
 
override void EOnInit (IEntity owner)
 
override void OnPostInit (IEntity owner)
 
void SCR_CampaignSuppliesComponent (IEntityComponentSource src, IEntity ent, IEntity parent)
 
void ~SCR_CampaignSuppliesComponent ()
 

Static Public Member Functions

static SCR_CampaignSuppliesComponent GetSuppliesComponent (notnull IEntity ent)
 

Public Attributes

ref ScriptInvoker m_OnSuppliesChanged = new ScriptInvoker()
 
ref ScriptInvoker m_OnSuppliesTruckDeleted = new ScriptInvoker()
 
bool m_bIsStandaloneDepot
 

Protected Member Functions

void OnPlayerKilled (notnull SCR_InstigatorContextData instigatorContextData)
 

Protected Attributes

SCR_CampaignMilitaryBaseComponent m_LastLoadedAt
 
SCR_CampaignMilitaryBaseComponent m_LastUnloadedAt
 
SCR_CampaignMilitaryBaseComponent m_LastXPAwardedAt
 
bool m_bAwardUnloadXP = true
 
bool m_bIsPlayerInRange
 
ref array< int > m_aLoadingPlayerIDs = {}
 
ref array< int > m_aUnloadingPlayerIDs = {}
 
int m_iSupplies
 
int m_iSuppliesMax
 
float m_fOperationalRadius
 

Static Protected Attributes

static const float SUPPLY_TRUCK_UNLOAD_RADIUS = 25
 m: maximum distance from a supply depot a player can still (un)load their truck
 

Detailed Description

Makes a vehicle able to carry Conflict resources.

Constructor & Destructor Documentation

◆ SCR_CampaignSuppliesComponent()

void SCR_CampaignSuppliesComponent.SCR_CampaignSuppliesComponent ( IEntityComponentSource  src,
IEntity  ent,
IEntity  parent 
)
Parameters
[in]src
[in]ent
[in]parent

◆ ~SCR_CampaignSuppliesComponent()

void SCR_CampaignSuppliesComponent.~SCR_CampaignSuppliesComponent ( )

Member Function Documentation

◆ AddSupplies()

void SCR_CampaignSuppliesComponent.AddSupplies ( int  supplies,
bool  replicate = true 
)
Parameters
[in]supplies
[in]replicate

◆ AwardXP()

bool SCR_CampaignSuppliesComponent.AwardXP ( )
Returns

◆ DeleteSupplyLoadingPlayer()

void SCR_CampaignSuppliesComponent.DeleteSupplyLoadingPlayer ( int  playerID)
Parameters
[in]playerID

◆ DeleteSupplyUnloadingPlayer()

void SCR_CampaignSuppliesComponent.DeleteSupplyUnloadingPlayer ( int  playerID)

Deletes from Unloading players array.

Parameters
[in]playerID

◆ EOnInit()

override void SCR_CampaignSuppliesComponent.EOnInit ( IEntity  owner)

◆ GetIsPlayerInRange()

bool SCR_CampaignSuppliesComponent.GetIsPlayerInRange ( )
Returns

◆ GetIsStandaloneDepot()

bool SCR_CampaignSuppliesComponent.GetIsStandaloneDepot ( )
Returns

◆ GetLoadingPlayer()

int SCR_CampaignSuppliesComponent.GetLoadingPlayer ( bool  unloading = false)
Parameters
[in]unloadingtrue to verify in Unloading array, otherwise it will look in loading array
Returns
first player from loading/unloading arrays

◆ GetOperationalRadius()

float SCR_CampaignSuppliesComponent.GetOperationalRadius ( )

Get the load / unload radius.

If set custom use this. if it's set to zero, use default.

Returns

◆ GetSupplies()

int SCR_CampaignSuppliesComponent.GetSupplies ( )
Returns

◆ GetSuppliesComponent()

static SCR_CampaignSuppliesComponent SCR_CampaignSuppliesComponent.GetSuppliesComponent ( notnull IEntity  ent)
static
Parameters
[in]ent
Returns
supplies component on the provided entity or null if cannot be found

◆ GetSuppliesMax()

int SCR_CampaignSuppliesComponent.GetSuppliesMax ( )
Returns

◆ OnPlayerKilled()

void SCR_CampaignSuppliesComponent.OnPlayerKilled ( notnull SCR_InstigatorContextData  instigatorContextData)
protected

◆ OnPostInit()

override void SCR_CampaignSuppliesComponent.OnPostInit ( IEntity  owner)

◆ OnSuppliesChanged()

void SCR_CampaignSuppliesComponent.OnSuppliesChanged ( )

◆ SetIsPlayerInRange()

void SCR_CampaignSuppliesComponent.SetIsPlayerInRange ( bool  status)
Parameters
[in]status

◆ SetLastLoadedAt()

void SCR_CampaignSuppliesComponent.SetLastLoadedAt ( SCR_CampaignMilitaryBaseComponent  base)
Parameters
[in]base

◆ SetLastUnloadedAt()

void SCR_CampaignSuppliesComponent.SetLastUnloadedAt ( SCR_CampaignMilitaryBaseComponent  base)
Parameters
[in]base

◆ SetSuppliesMax()

void SCR_CampaignSuppliesComponent.SetSuppliesMax ( int  suppliesMax)
Parameters
[in]suppliesMax

◆ SetSupplyLoadingPlayer()

void SCR_CampaignSuppliesComponent.SetSupplyLoadingPlayer ( int  playerID)

Setter for Loading players array.

Parameters
[in]playerID

◆ SetSupplyUnloadingPlayer()

void SCR_CampaignSuppliesComponent.SetSupplyUnloadingPlayer ( int  playerID)

Setter for Unloading players array.

Parameters
[in]playerID

Member Data Documentation

◆ m_aLoadingPlayerIDs

ref array<int> SCR_CampaignSuppliesComponent.m_aLoadingPlayerIDs = {}
protected

◆ m_aUnloadingPlayerIDs

ref array<int> SCR_CampaignSuppliesComponent.m_aUnloadingPlayerIDs = {}
protected

◆ m_bAwardUnloadXP

bool SCR_CampaignSuppliesComponent.m_bAwardUnloadXP = true
protected

◆ m_bIsPlayerInRange

bool SCR_CampaignSuppliesComponent.m_bIsPlayerInRange
protected

◆ m_bIsStandaloneDepot

bool SCR_CampaignSuppliesComponent.m_bIsStandaloneDepot

◆ m_fOperationalRadius

float SCR_CampaignSuppliesComponent.m_fOperationalRadius
protected

◆ m_iSupplies

int SCR_CampaignSuppliesComponent.m_iSupplies
protected

◆ m_iSuppliesMax

int SCR_CampaignSuppliesComponent.m_iSuppliesMax
protected

◆ m_LastLoadedAt

SCR_CampaignMilitaryBaseComponent SCR_CampaignSuppliesComponent.m_LastLoadedAt
protected

◆ m_LastUnloadedAt

SCR_CampaignMilitaryBaseComponent SCR_CampaignSuppliesComponent.m_LastUnloadedAt
protected

◆ m_LastXPAwardedAt

SCR_CampaignMilitaryBaseComponent SCR_CampaignSuppliesComponent.m_LastXPAwardedAt
protected

◆ m_OnSuppliesChanged

ref ScriptInvoker SCR_CampaignSuppliesComponent.m_OnSuppliesChanged = new ScriptInvoker()

◆ m_OnSuppliesTruckDeleted

ref ScriptInvoker SCR_CampaignSuppliesComponent.m_OnSuppliesTruckDeleted = new ScriptInvoker()

◆ SUPPLY_TRUCK_UNLOAD_RADIUS

const float SCR_CampaignSuppliesComponent.SUPPLY_TRUCK_UNLOAD_RADIUS = 25
staticprotected

m: maximum distance from a supply depot a player can still (un)load their truck


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