Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_EnableSpawnPointEditorAttribute.c
Go to the documentation of this file.
1 
6 {
7  //------------------------------------------------------------------------------------------------
8  override SCR_BaseEditorAttributeVar ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
9  {
10  SCR_EditableEntityComponent editableEntity = SCR_EditableEntityComponent.Cast(item);
11  if (!editableEntity)
12  return null;
13 
14  SCR_SpawnPoint spawnPoint = SCR_SpawnPoint.Cast(editableEntity.GetOwner());
15  if (!spawnPoint)
16  return null;
17 
18  return SCR_BaseEditorAttributeVar.CreateBool(spawnPoint.IsSpawnPointEnabled());
19  }
20 
21  //------------------------------------------------------------------------------------------------
22  override void WriteVariable(Managed item, SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, int playerID)
23  {
24  if (!var)
25  return;
26 
27  SCR_EditableEntityComponent editableEntity = SCR_EditableEntityComponent.Cast(item);
28  if (!editableEntity)
29  return;
30 
31  SCR_SpawnPoint spawnPoint = SCR_SpawnPoint.Cast(editableEntity.GetOwner());
32  if (!spawnPoint)
33  return;
34 
35  spawnPoint.SetSpawnPointEnabled_S(var.GetBool());
36  }
37 }
SCR_SpawnPoint
Spawn point entity defines positions on which players can possibly spawn.
Definition: SCR_SpawnPoint.c:27
SCR_BaseEditorAttributeCustomTitle
Definition: SCR_BaseEditorAttribute.c:868
SCR_BaseEditorAttributeVar
Definition: SCR_BaseEditorAttributeVar.c:1
SCR_BaseEditorAttribute
Base Attribute Script for other attributes to inherent from to get and set varriables in Editor Attri...
Definition: SCR_BaseEditorAttribute.c:3
SCR_EditableEntityComponent
Definition: SCR_EditableEntityComponent.c:13
SCR_EnableSpawnPointEditorAttribute
Definition: SCR_EnableSpawnPointEditorAttribute.c:5
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468