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

Basically SCR_SpawnPoint with the ability to limit respawn amount. More...

Inheritance diagram for SCR_RestrictedDeployableSpawnPoint:
[legend]

Public Member Functions

override bool IsSpawnPointVisibleForPlayer (int pid)
 
override void OnFinalizeSpawnDone_S (SCR_SpawnRequestComponent requestComponent, SCR_SpawnData data, IEntity entity)
 Authority: Callback for when finalization is done, e.g.
 
override bool CanReserveFor_S (int playerId, out SCR_ESpawnResult result=SCR_ESpawnResult.SPAWN_NOT_ALLOWED)
 Authority: Returns whether this point can be reserved for provided player.
 
void SetAllowAllGroupsToSpawn (bool allowAllGroupsToSpawn)
 
void SetBudgetType (SCR_ESpawnPointBudgetType budgetType)
 
void SetGroupID (int groupID)
 
int GetMaxRespawns ()
 
void SetMaxRespawns (int maxRespawns)
 
int GetRespawnCount ()
 
void SetRespawnCount (int respawnCount)
 
bool IsLoadoutAllowed ()
 
void SetLoadoutAllowed (bool allow)
 
- Public Member Functions inherited from SCR_DeployableSpawnPoint
override void OnFinalizeSpawnDone_S (SCR_SpawnRequestComponent requestComponent, SCR_SpawnData data, IEntity entity)
 Authority: Callback for when finalization is done, e.g.
 
void SetDeployableSpawnPointComponent (SCR_BaseDeployableSpawnPointComponent spawnPointComp)
 
SCR_BaseDeployableSpawnPointComponent GetDeployableSpawnPointComponent ()
 
- Public Member Functions inherited from SCR_SpawnPoint
bool IsSpawnPointVisibleForPlayer (int pid)
 
bool IsSpawnPointEnabled ()
 
void SetSpawnPointEnabled_S (bool enabled)
 
ScriptInvokerBool GetOnSpawnPointEnabled ()
 
float GetRespawnTime ()
 
void SetRespawnTime (float time)
 
bool CanReserveFor_S (int playerId, out SCR_ESpawnResult result=SCR_ESpawnResult.SPAWN_NOT_ALLOWED)
 Authority: Returns whether this point can be reserved for provided player.
 
bool IsReservedFor_S (int playerId)
 Authority: Returns whether this point is currently reserved for provided player.
 
bool ReserveFor_S (int playerId)
 Authority: Returns whether this point is currently reserved for provided player.
 
void ClearReservationFor_S (int playerId)
 Authority: Clears reservation for provided player.
 
float GetSpawnRadius ()
 
void SetSpawnRadius (float radius)
 
RplId GetRplId ()
 Returns RplId of this spawn point.
 
void SetUseNearbySpawnPositions (bool use)
 
void GetPositionAndRotation (out vector pos, out vector rot)
 
bool IsSpawnPointActive ()
 
bool GetVisibleInDeployMapOnly ()
 
void SetVisibleInDeployMapOnly (bool visible)
 
void SetFaction (Faction faction)
 
void SetFactionKey (string factionKey)
 
void SetSpawnPositionRange (float range)
 
float GetSpawnPositionRange ()
 
array< SCR_PositionGetChildSpawnPoints ()
 
string GetFactionKey ()
 
SCR_UIInfo GetInfo ()
 
void SetInfo (SCR_UIInfo info)
 
string GetSpawnPointName ()
 
void SetSpawnPointName (string name)
 
bool IsTimed ()
 
void SetIsTimed (bool isTimed)
 
void LinkInfo (SCR_UIInfo info)
 
override void SetColorAndText ()
 
bool PrepareSpawnedEntity_S (SCR_SpawnRequestComponent requestComponent, SCR_SpawnData data, IEntity entity)
 
bool CanFinalizeSpawn_S (SCR_SpawnRequestComponent requestComponent, SCR_SpawnData data, IEntity entity)
 Authority: The PrepareEntity_S step might start doing an operation which is not performed immediately, for such cases we can await the finalization by returning 'false', until spawned entity is in desired state.
 
void OnFinalizeSpawnDone_S (SCR_SpawnRequestComponent requestComponent, SCR_SpawnData data, IEntity entity)
 Authority: Callback for when finalization is done, e.g.
 
override void EOnInit (IEntity owner)
 
override bool RplSave (ScriptBitWriter writer)
 
void SCR_SpawnPoint (IEntitySource src, IEntity parent)
 
void ~SCR_SpawnPoint ()
 
- Public Member Functions inherited from SCR_Position
void SetColorAndText ()
 
override void _WB_AfterWorldUpdate (float timeSlice)
 
void SCR_Position (IEntitySource src, IEntity parent)
 

Protected Member Functions

bool CanSpawn (notnull array< SCR_ChimeraCharacter > characters, Faction spawnPointFaction, vector spawnPointOrigin)
 
- Protected Member Functions inherited from SCR_SpawnPoint
void OnSetEnabled ()
 
bool GetEmptyPositionAndRotationInRange (out vector pos, out vector rot)
 
void ApplyFactionChange (FactionAffiliationComponent owner, Faction previousFaction, Faction newFaction)
 
void OnSetFactionKey ()
 
void InitFactionAffiliation (IEntity owner)
 
override bool RplLoad (ScriptBitReader reader)
 

Protected Attributes

bool m_bAllowAllGroupsToSpawn
 
int m_iGroupID = -1
 
SCR_ESpawnPointBudgetType m_eRespawnBudgetType
 
int m_iMaxRespawns
 
int m_iRespawnCount
 
bool m_bLoadoutAllowed
 
- Protected Attributes inherited from SCR_DeployableSpawnPoint
SCR_BaseDeployableSpawnPointComponent m_DeployableSpawnPointComp
 
- Protected Attributes inherited from SCR_SpawnPoint
RplComponent m_RplComponent
 
float m_fSpawnRadius
 
string m_sFaction
 
bool m_bShowInDeployMapOnly
 
bool m_bTimedSpawnPoint
 
SCR_UIInfo m_LinkedInfo
 
SCR_FactionAffiliationComponent m_FactionAffiliationComponent
 
ref SCR_UIInfo m_Info
 
bool m_bUseNearbySpawnPositions
 
float m_fSpawnPositionUsageRange
 
float m_fRespawnTime
 
string m_sSpawnPointName
 
ref array< SCR_Positionm_aChildren = {}
 
ref set< int > m_ReservationLocks = new set<int>()
 Authority: Set of all pending players that have a reservation for this spawn point.
 
ref ScriptInvokerBool m_OnSetSpawnPointEnabled
 
bool m_bSpawnPointEnabled
 
- Protected Attributes inherited from SCR_Position
int m_iColor = Color.WHITE
 
string m_sText = string.Empty
 

Additional Inherited Members

- Static Public Member Functions inherited from SCR_DeployableSpawnPoint
static SCR_DeployableSpawnPoint_Invoker GetOnPlayerSpawned ()
 
- Static Public Member Functions inherited from SCR_SpawnPoint
static SCR_SpawnPointFinalizeSpawn_Invoker GetOnSpawnPointFinalizeSpawn ()
 
static void ShowSpawnPointDescriptors (bool show, Faction faction)
 
static SCR_SpawnPoint GetSpawnPointByRplId (RplId id)
 
static SCR_SpawnPoint GetSpawnPointByIndex (int spawnPointIndex)
 Return spawn point or null if out of bounds.
 
static int GetSpawnPointIndex (SCR_SpawnPoint spawnPoint)
 Return spawn point index or -1 if not existant.
 
static int CountSpawnPoints ()
 
static array< SCR_SpawnPointGetSpawnPoints ()
 
static SCR_SpawnPoint GetRandomSpawnPointDeathmatch ()
 
static SCR_SpawnPoint GetRandomSpawnPoint (SCR_ChimeraCharacter character)
 
static array< SCR_SpawnPointGetSpawnPointsForPlayer (SCR_ChimeraCharacter character)
 
static array< SCR_SpawnPointGetSpawnPointsForFaction (string factionKey)
 Get spawn points valid for given faction.
 
static int GetSpawnPointCountForFaction (string factionKey)
 Get count of spawn points belonging to given faction.
 
static SCR_SpawnPoint GetRandomSpawnPointForFaction (string factionKey)
 
- Static Public Attributes inherited from SCR_SpawnPoint
static ref ScriptInvoker Event_OnSpawnPointCountChanged = new ScriptInvoker()
 
static ref ScriptInvoker Event_SpawnPointFactionAssigned = new ScriptInvoker()
 
static ref SpawnPointInvoker Event_SpawnPointAdded = new SpawnPointInvoker()
 
static ref SpawnPointInvoker Event_SpawnPointRemoved = new SpawnPointInvoker()
 
static ref SCR_SpawnPointFinalizeSpawn_Invoker s_OnSpawnPointFinalizeSpawn
 
static ref SCR_SpawnPointNameChanged_Invoker OnSpawnPointNameChanged = new SCR_SpawnPointNameChanged_Invoker()
 
- Static Protected Attributes inherited from SCR_DeployableSpawnPoint
static ref SCR_DeployableSpawnPoint_Invoker s_OnPlayerSpawned
 

Detailed Description

Basically SCR_SpawnPoint with the ability to limit respawn amount.

Member Function Documentation

◆ CanReserveFor_S()

override bool SCR_RestrictedDeployableSpawnPoint.CanReserveFor_S ( int  playerId,
out SCR_ESpawnResult  result = SCR_ESpawnResult::SPAWN_NOT_ALLOWED 
)

Authority: Returns whether this point can be reserved for provided player.

Derived logic can e.g. check amount of pending locks versus available compartments for vehicle spawn points and similar.

Parameters
playerIdPlayerId of player who wants to reserve this point
[out]resultReason why respawn is disabled. Note that if returns true the reason will always be OK
Returns
Return true if reservation can proceed, false otherwise.

Implements SCR_SpawnPoint.

◆ CanSpawn()

bool SCR_RestrictedDeployableSpawnPoint.CanSpawn ( notnull array< SCR_ChimeraCharacter characters,
Faction  spawnPointFaction,
vector  spawnPointOrigin 
)
protected

◆ GetMaxRespawns()

int SCR_RestrictedDeployableSpawnPoint.GetMaxRespawns ( )

◆ GetRespawnCount()

int SCR_RestrictedDeployableSpawnPoint.GetRespawnCount ( )

◆ IsLoadoutAllowed()

bool SCR_RestrictedDeployableSpawnPoint.IsLoadoutAllowed ( )

◆ IsSpawnPointVisibleForPlayer()

override bool SCR_RestrictedDeployableSpawnPoint.IsSpawnPointVisibleForPlayer ( int  pid)

Implements SCR_SpawnPoint.

◆ OnFinalizeSpawnDone_S()

override void SCR_RestrictedDeployableSpawnPoint.OnFinalizeSpawnDone_S ( SCR_SpawnRequestComponent  requestComponent,
SCR_SpawnData  data,
IEntity  entity 
)

Authority: Callback for when finalization is done, e.g.

the ownership is passed to the client and the spawn process is deemed complete.

Implements SCR_DeployableSpawnPoint.

◆ SetAllowAllGroupsToSpawn()

void SCR_RestrictedDeployableSpawnPoint.SetAllowAllGroupsToSpawn ( bool  allowAllGroupsToSpawn)

◆ SetBudgetType()

void SCR_RestrictedDeployableSpawnPoint.SetBudgetType ( SCR_ESpawnPointBudgetType  budgetType)

◆ SetGroupID()

void SCR_RestrictedDeployableSpawnPoint.SetGroupID ( int  groupID)

◆ SetLoadoutAllowed()

void SCR_RestrictedDeployableSpawnPoint.SetLoadoutAllowed ( bool  allow)

◆ SetMaxRespawns()

void SCR_RestrictedDeployableSpawnPoint.SetMaxRespawns ( int  maxRespawns)

◆ SetRespawnCount()

void SCR_RestrictedDeployableSpawnPoint.SetRespawnCount ( int  respawnCount)

Member Data Documentation

◆ m_bAllowAllGroupsToSpawn

bool SCR_RestrictedDeployableSpawnPoint.m_bAllowAllGroupsToSpawn
protected

◆ m_bLoadoutAllowed

bool SCR_RestrictedDeployableSpawnPoint.m_bLoadoutAllowed
protected

◆ m_eRespawnBudgetType

SCR_ESpawnPointBudgetType SCR_RestrictedDeployableSpawnPoint.m_eRespawnBudgetType
protected

◆ m_iGroupID

int SCR_RestrictedDeployableSpawnPoint.m_iGroupID = -1
protected

◆ m_iMaxRespawns

int SCR_RestrictedDeployableSpawnPoint.m_iMaxRespawns
protected

◆ m_iRespawnCount

int SCR_RestrictedDeployableSpawnPoint.m_iRespawnCount
protected

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