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_ToggleDamageEditorAttribute.c
Go to the documentation of this file.
1
// Script File SCR_ToggleDamageEditorAttribute
2
[
BaseContainerProps
(),
SCR_BaseEditorAttributeCustomTitle
()]
3
class
SCR_ToggleDamageEditorAttribute
:
SCR_BaseEditorAttribute
4
{
5
override
SCR_BaseEditorAttributeVar
ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
6
{
7
//WIP
8
#ifndef WORKBENCH
9
return
null;
10
#endif
11
12
SCR_EditableEntityComponent
editableEntity =
SCR_EditableEntityComponent
.Cast(item);
13
if
(!editableEntity)
return
null;
14
15
IEntity
owner = editableEntity.GetOwner();
16
if
(!owner)
return
null;
17
DamageManagerComponent
damageComponent =
DamageManagerComponent
.Cast(owner.
FindComponent
(
DamageManagerComponent
));
18
19
if
(!damageComponent)
return
null;
20
21
return
SCR_BaseEditorAttributeVar
.
CreateInt
(1);
22
}
23
override
void
WriteVariable(Managed item,
SCR_BaseEditorAttributeVar
var, SCR_AttributesManagerEditorComponent manager,
int
playerID)
24
{
25
if
(!var)
return
;
26
SCR_EditableEntityComponent
editableEntity =
SCR_EditableEntityComponent
.Cast(item);
27
28
IEntity
owner = editableEntity.GetOwner();
29
if
(!owner)
return
;
30
DamageManagerComponent
damageComponent =
DamageManagerComponent
.Cast(owner.
FindComponent
(
DamageManagerComponent
));
31
if
(!damageComponent)
return
;
32
33
Print
(
"Set Damage enabled: "
+ var.
GetInt
());
34
}
35
};
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
DamageManagerComponent
Definition
DamageManagerComponent.c:13
IEntity
Definition
IEntity.c:13
IEntity::FindComponent
proto external Managed FindComponent(typename typeName)
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_BaseEditorAttributeVar
Definition
SCR_BaseEditorAttributeVar.c:2
SCR_BaseEditorAttributeVar::CreateInt
static SCR_BaseEditorAttributeVar CreateInt(int value)
Definition
SCR_BaseEditorAttributeVar.c:107
SCR_BaseEditorAttributeVar::GetInt
int GetInt()
Definition
SCR_BaseEditorAttributeVar.c:20
SCR_EditableEntityComponent
Definition
SCR_EditableEntityComponent.c:14
SCR_ToggleDamageEditorAttribute
Definition
SCR_ToggleDamageEditorAttribute.c:4
Print
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
scripts
Game
Editor
Containers
Attributes
SCR_ToggleDamageEditorAttribute.c
Generated by
1.17.0