18 [
Attribute(
"0",
desc:
"If true players are able to spawn at stationary command truck vehicles")]
21 [
Attribute(
"1",
desc:
"It allows players to deploy their radiobackpack and create a deployable radio spawn point. It still allows existing deployed radio spawnpoints to be deconstructed by players if this bool is false")]
27 [
Attribute(
"5",
desc:
"Amount of spawn tickets available for deployed radios")]
53 array<int> playerIDs = {};
54 int playerIDCount =
GetGame().GetPlayerManager().GetPlayers(playerIDs);
55 for (
int i; i < playerIDCount; i++)
70 if (notificationPlayerID > 0)
73 SCR_NotificationsComponent.SendToEveryone(
ENotification.EDITOR_ATTRIBUTES_ENABLE_RESPAWN_ON_PLAYER, notificationPlayerID);
75 SCR_NotificationsComponent.SendToEveryone(
ENotification.EDITOR_ATTRIBUTES_DISABLE_RESPAWN_ON_PLAYER, notificationPlayerID);
93 if (!resource || !resource.IsValid())
95 Debug.Error(
string.Format(
"Invalid spawn point resource: %1 in %2::AddSpawnPoint",
101 SCR_PlayerSpawnPoint spawnPoint = SCR_PlayerSpawnPoint.Cast(
GetGame().SpawnEntityPrefab(resource,
GetOwner().GetWorld()));
102 spawnPoint.SetPlayerID(playerID);
106 Debug.Error(
string.Format(
"PlayerSpawnPoint for player: %1 could not be created!", playerID));
116 SCR_PlayerSpawnPoint spawnPoint;
119 RplComponent.DeleteRplEntity(spawnPoint,
false);
136 if (notificationPlayerID > 0)
139 SCR_NotificationsComponent.SendToEveryone(
ENotification.EDITOR_ATTRIBUTES_ENABLE_RESPAWN_ON_RADIO_VEHICLE, notificationPlayerID);
141 SCR_NotificationsComponent.SendToEveryone(
ENotification.EDITOR_ATTRIBUTES_DISABLE_RESPAWN_ON_RADIO_VEHICLE, notificationPlayerID);
184 if (notificationPlayerID > 0)
187 SCR_NotificationsComponent.SendToEveryone(
ENotification.EDITOR_ATTRIBUTES_ENABLE_DEPLOYABLE_RADIO_SPAWNPOINT, notificationPlayerID);
189 SCR_NotificationsComponent.SendToEveryone(
ENotification.EDITOR_ATTRIBUTES_DISABLE_DEPLOYABLE_RADIO_SPAWNPOINT, notificationPlayerID);
235 if (notificationPlayerID <= 0)
239 SCR_NotificationsComponent.SendToEveryone(
ENotification.EDITOR_ATTRIBUTES_CHANGED_DEPLOYABLE_RADIO_SPAWNPOINT_BUDGET_NONE, notificationPlayerID);
241 SCR_NotificationsComponent.SendToEveryone(
ENotification.EDITOR_ATTRIBUTES_CHANGED_DEPLOYABLE_RADIO_SPAWNPOINT_BUDGET_SUPPLIES, notificationPlayerID);
243 SCR_NotificationsComponent.SendToEveryone(
ENotification.EDITOR_ATTRIBUTES_CHANGED_DEPLOYABLE_RADIO_SPAWNPOINT_BUDGET_TICKETS, notificationPlayerID);
285 if (notificationPlayerID > 0)
286 SCR_NotificationsComponent.SendToEveryone(
ENotification.EDITOR_ATTRIBUTES_CHANGED_DEPLOYABLE_RADIO_SPAWNPOINT_TICKET_AMOUNT, notificationPlayerID, tickets);
331 int playerId = requestComponent.GetPlayerId();
332 SCR_PlayerSpawnPoint playerPoint;
334 playerPoint.EnablePoint(playerId, entity);
343 SCR_PlayerSpawnPoint playerPoint;
344 if (
m_SpawnPoints.Find(instigatorContextData.GetVictimPlayerID(), playerPoint))
345 playerPoint.DisablePoint(instigatorContextData.GetVictimPlayerID());
360 bool radioVehicleSpawningEnabled, deployableSpawnPointsEnabled;
362 reader.ReadBool(radioVehicleSpawningEnabled);
363 reader.ReadBool(deployableSpawnPointsEnabled);
374 foreach (
int pointId, SCR_PlayerSpawnPoint spawnPoint :
m_SpawnPoints)
376 RplComponent.DeleteRplEntity(spawnPoint,
false);
ArmaReforgerScripted GetGame()
enum EAIGroupCombatMode ComponentEditorProps(category:"GameScripted/AI", description:"Component for utility AI system for groups")
SCR_BaseGameModeComponentClass m_pGameMode
The game mode entity this component is attached to.
void SCR_BaseGameModeComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Get all prefabs that have the spawner data
ScriptInvokerBase< SCR_DeployableSpawnPointBudgetChangedDelegate > SCR_SpawnPointBudgetInvoker
func SCR_DeployableSpawnPointBudgetChangedDelegate
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
SCR_ESpawnPointBudgetType
ScriptInvokerBase< ScriptInvokerBoolMethod > ScriptInvokerBool
ScriptInvokerBase< ScriptInvokerIntMethod > ScriptInvokerInt
Object holding reference to resource. In destructor release the resource.
bool m_bEnablePlayerSpawnPoints
ref SCR_SpawnPointBudgetInvoker m_OnSpawnPointBudgetTypeChanged
override void OnPlayerSpawnFinalize_S(SCR_SpawnRequestComponent requestComponent, SCR_SpawnHandlerComponent handlerComponent, SCR_SpawnData data, IEntity entity)
ref ScriptInvokerInt m_OnSpawnPointTicketAmountChanged
ResourceName m_SpawnPointPrefab
SCR_ESpawnPointBudgetType m_eDeployableSpawnPointBudgetType
void EnableRadioVehicleSpawning(bool enable, int notificationPlayerID=-1)
override void OnPlayerConnected(int playerId)
void SetDeployableSpawnPointBudgetType(SCR_ESpawnPointBudgetType budgetType, int notificationPlayerID=-1)
bool m_bRadioVehicleSpawningEnabled
void RPC_SetDeployableSpawnPointTicketAmount(int tickets)
void RPC_EnableDeployableSpawnPoints(bool enable)
ScriptInvokerInt GetOnSpawnPointTicketAmountChanged()
bool m_bDeployableSpawnPointsEnabled
ScriptInvokerBool GetOnSpawnPointDeployingEnabledChanged()
override void OnPlayerDisconnected(int playerId, KickCauseCode cause, int timeout)
override void OnPlayerKilled(notnull SCR_InstigatorContextData instigatorContextData)
void SetDeployableSpawnPointTicketAmount(int tickets, int notificationPlayerID=-1)
void AddSpawnPoint(int playerID)
void RPC_SetDeployableSpawnPointBudgetType(SCR_ESpawnPointBudgetType budgetType)
SCR_ESpawnPointBudgetType GetDeployableSpawnPointBudgetType()
int m_iDeployableSpawnPointTicketAmount
void RemoveSpawnPoint(int playerID)
void RPC_EnableRadioVehicleSpawning(bool enable)
override bool RplLoad(ScriptBitReader reader)
bool IsDeployingSpawnPointsEnabled()
bool IsPlayerSpawnPointsEnabled()
override void OnDelete(IEntity owner)
bool IsRadioVehicleSpawningEnabled()
SCR_SpawnPointBudgetInvoker GetOnSpawnPointBudgetTypeChanged()
ScriptInvokerBool GetOnRadioVehicleSpawningChanged()
void EnablePlayerSpawnPoints(bool enable, int notificationPlayerID=-1)
override bool RplSave(ScriptBitWriter writer)
ref ScriptInvokerBool m_OnRadioVehicleSpawningChanged
ref map< int, SCR_PlayerSpawnPoint > m_SpawnPoints
void EnableDeployableSpawnPoints(bool enable, int notificationPlayerID=-1)
ref ScriptInvokerBool m_OnSpawnPointDeployingEnabledChanged
int GetDeployableSpawnPointTicketAmount()
IEntity GetOwner()
Owner entity of the fuel tank.
SCR_FieldOfViewSettings Attribute
void RplRpc(RplChannel channel, RplRcver rcver, RplCondition condition=RplCondition.None, string customConditionName="")
RplChannel
Communication channel. Reliable is guaranteed to be delivered. Unreliable not.
proto external string ToString()
Plain C++ pointer, no weak pointers, no memory management.