Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_SpawnAtPlayersAttribute.c
Go to the documentation of this file.
1
4
// Script File
5
[
BaseContainerProps
(),
SCR_BaseEditorAttributeCustomTitle
()]
6
class
SCR_SpawnAtPlayersEditorAttribute
:
SCR_BaseEditorAttribute
7
{
8
override
SCR_BaseEditorAttributeVar
ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
9
{
10
//If opened in global attributes
11
if
(!
IsGameMode
(item))
12
return
null;
13
14
BaseGameMode gameMode =
GetGame
().GetGameMode();
15
if
(!gameMode)
16
return
null;
17
18
SCR_PlayerSpawnPointManagerComponent
playerSpawnPointManager =
SCR_PlayerSpawnPointManagerComponent
.Cast(gameMode.FindComponent(
SCR_PlayerSpawnPointManagerComponent
));
19
if
(!playerSpawnPointManager)
20
return
null;
21
22
return
SCR_BaseEditorAttributeVar
.
CreateBool
(playerSpawnPointManager.
IsPlayerSpawnPointsEnabled
());
23
}
24
25
override
void
WriteVariable(Managed item,
SCR_BaseEditorAttributeVar
var, SCR_AttributesManagerEditorComponent manager,
int
playerID)
26
{
27
if
(!var)
28
return
;
29
30
//If opened in global attributes
31
if
(!
IsGameMode
(item))
32
return
;
33
34
BaseGameMode gameMode =
GetGame
().GetGameMode();
35
if
(!gameMode)
36
return
;
37
38
SCR_PlayerSpawnPointManagerComponent
playerSpawnPointManager =
SCR_PlayerSpawnPointManagerComponent
.Cast(gameMode.FindComponent(
SCR_PlayerSpawnPointManagerComponent
));
39
if
(!playerSpawnPointManager)
40
return
;
41
42
//Notification
43
playerSpawnPointManager.
EnablePlayerSpawnPoints
(var.
GetBool
(), playerID);
44
}
45
};
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
SCR_BaseEditorAttributeCustomTitle
Definition
SCR_BaseEditorAttribute.c:876
SCR_BaseEditorAttribute
Base Attribute Script for other attributes to inherent from to get and set varriables in Editor Attri...
Definition
SCR_BaseEditorAttribute.c:4
SCR_BaseEditorAttribute::IsGameMode
bool IsGameMode(Managed item)
Definition
SCR_BaseEditorAttribute.c:466
SCR_BaseEditorAttributeVar
Definition
SCR_BaseEditorAttributeVar.c:2
SCR_BaseEditorAttributeVar::CreateBool
static SCR_BaseEditorAttributeVar CreateBool(bool value)
Definition
SCR_BaseEditorAttributeVar.c:119
SCR_BaseEditorAttributeVar::GetBool
bool GetBool()
Definition
SCR_BaseEditorAttributeVar.c:56
SCR_PlayerSpawnPointManagerComponent
Definition
SCR_PlayerSpawnPointManagerComponent.c:11
SCR_PlayerSpawnPointManagerComponent::IsPlayerSpawnPointsEnabled
bool IsPlayerSpawnPointsEnabled()
Definition
SCR_PlayerSpawnPointManagerComponent.c:81
SCR_PlayerSpawnPointManagerComponent::EnablePlayerSpawnPoints
void EnablePlayerSpawnPoints(bool enable, int notificationPlayerID=-1)
Definition
SCR_PlayerSpawnPointManagerComponent.c:43
SCR_SpawnAtPlayersEditorAttribute
Definition
SCR_SpawnAtPlayersAttribute.c:7
scripts
Game
Editor
Containers
Attributes
SCR_SpawnAtPlayersAttribute.c
Generated by
1.17.0