Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_DeployableSpawnPoint.c
Go to the documentation of this file.
1 [EntityEditorProps(category: "GameScripted/DeployableItems", description: "", visible: false)]
3 {
4 };
5 
8 typedef ScriptInvokerBase<SpawnPointInvokerDelegate> SCR_DeployableSpawnPoint_Invoker;
9 
10 //------------------------------------------------------------------------------------------------
12 {
13  protected static ref SCR_DeployableSpawnPoint_Invoker s_OnPlayerSpawned;
14 
15  protected SCR_BaseDeployableSpawnPointComponent m_DeployableSpawnPointComp;
16 
17  //------------------------------------------------------------------------------------------------
18  override void OnFinalizeSpawnDone_S(SCR_SpawnRequestComponent requestComponent, SCR_SpawnData data, IEntity entity)
19  {
20  super.OnFinalizeSpawnDone_S(requestComponent, data, entity);
21 
22  PlayerManager playerManager = GetGame().GetPlayerManager();
23  if (!playerManager)
24  return;
25 
26  int userID = playerManager.GetPlayerIdFromControlledEntity(entity);
27 
28  // param1: spawnpoint entity from which event was invoked; param2: player who spawned
29  if (s_OnPlayerSpawned)
30  s_OnPlayerSpawned.Invoke(this, userID);
31  }
32 
33  //------------------------------------------------------------------------------------------------
34  void SetDeployableSpawnPointComponent(SCR_BaseDeployableSpawnPointComponent spawnPointComp)
35  {
36  m_DeployableSpawnPointComp = spawnPointComp;
37  }
38 
39  //------------------------------------------------------------------------------------------------
40  SCR_BaseDeployableSpawnPointComponent GetDeployableSpawnPointComponent()
41  {
42  return m_DeployableSpawnPointComp;
43  }
44 
45  //------------------------------------------------------------------------------------------------
46  static SCR_DeployableSpawnPoint_Invoker GetOnPlayerSpawned()
47  {
48  if (!s_OnPlayerSpawned)
49  s_OnPlayerSpawned = new SCR_DeployableSpawnPoint_Invoker();
50 
51  return s_OnPlayerSpawned;
52  }
53 }
EntityEditorProps
enum EQueryType EntityEditorProps(category:"GameScripted/Sound", description:"THIS IS THE SCRIPT DESCRIPTION.", color:"0 0 255 255")
Definition: SCR_AmbientSoundsComponent.c:12
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
SpawnPointInvokerDelegate
func SpawnPointInvokerDelegate
Definition: SCR_DeployableSpawnPoint.c:7
SCR_SpawnPoint
Spawn point entity defines positions on which players can possibly spawn.
Definition: SCR_SpawnPoint.c:27
SCR_SpawnPointClass
Definition: SCR_SpawnPoint.c:2
func
func
Definition: SCR_AIThreatSystem.c:5
SCR_SpawnData
Definition: SCR_SpawnData.c:9
SCR_DeployableSpawnPoint_Invoker
ScriptInvokerBase< SpawnPointInvokerDelegate > SCR_DeployableSpawnPoint_Invoker
Definition: SCR_DeployableSpawnPoint.c:8
SCR_DeployableSpawnPointClass
Definition: SCR_DeployableSpawnPoint.c:2
data
Get all prefabs that have the spawner data
Definition: SCR_EntityCatalogManagerComponent.c:305
PlayerManager
Definition: PlayerManager.c:12
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180
SCR_DeployableSpawnPoint
Definition: SCR_DeployableSpawnPoint.c:11