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_AIMovementSpeedEditorAttribute.c
Go to the documentation of this file.
1
[
BaseContainerProps
(),
SCR_BaseEditorAttributeCustomTitle
()]
2
class
SCR_AiMovementSpeedEditorAttribute
:
SCR_BaseFloatValueHolderEditorAttribute
3
{
4
//---- REFACTOR NOTE START: Not up to date with internal scripting style ----
5
// Probably not implemeneted
6
// Empty brackets of character check
7
8
override
SCR_BaseEditorAttributeVar
ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
9
{
10
SCR_EditableEntityComponent
editableEntity =
SCR_EditableEntityComponent
.Cast(item);
11
if
(!editableEntity || (editableEntity.
GetEntityType
() !=
EEditableEntityType
.CHARACTER && editableEntity.
GetEntityType
() !=
EEditableEntityType
.GROUP))
return
null;
12
if
(editableEntity.
HasEntityState
(
EEditableEntityState
.PLAYER))
return
null;
13
14
//WIP
15
#ifndef WORKBENCH
16
return
null;
17
#endif
18
19
//If character
20
if
(editableEntity.
GetEntityType
() ==
EEditableEntityType
.CHARACTER)
21
{
22
23
}
24
//If group
25
else
26
{
27
SCR_AIGroup
aiGroup;
// = SCR_AIGroup.Cast(GetOwner(editableEntity));
28
if
(!aiGroup)
return
null;
29
}
30
31
//Should get character movement speed
32
return
SCR_BaseEditorAttributeVar
.
CreateInt
(1);
33
}
34
override
void
WriteVariable(Managed item,
SCR_BaseEditorAttributeVar
var, SCR_AttributesManagerEditorComponent manager,
int
playerID)
35
{
36
//TODO: Implement logics
37
if
(!var)
return
;
38
39
bool
setRunning = (
int
)
m_aValues
[var.
GetInt
()].GetFloatValue();
40
41
SCR_EditableEntityComponent
editableEntity =
SCR_EditableEntityComponent
.Cast(item);
42
43
if
(editableEntity.
GetEntityType
() ==
EEditableEntityType
.CHARACTER)
44
{
45
Print
(
"Set Character running: "
+ setRunning);
46
}
47
else
if
(editableEntity.
GetEntityType
() ==
EEditableEntityType
.GROUP)
48
{
49
Print
(
"Set Group running: "
+ setRunning);
50
}
51
}
52
53
//---- REFACTOR NOTE END ----
54
};
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
SCR_AIGroup
Definition
SCR_AIGroup.c:75
SCR_AiMovementSpeedEditorAttribute
Definition
SCR_AIMovementSpeedEditorAttribute.c:3
SCR_BaseEditorAttributeCustomTitle
Definition
SCR_BaseEditorAttribute.c:876
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_BaseFloatValueHolderEditorAttribute
Attribute base for Name, icon and float value for other attributes to inherent from.
Definition
SCR_BaseFloatValueHolderEditorAttribute.c:4
SCR_BaseFloatValueHolderEditorAttribute::m_aValues
ref array< ref SCR_EditorAttributeFloatStringValueHolder > m_aValues
Definition
SCR_BaseFloatValueHolderEditorAttribute.c:6
SCR_EditableEntityComponent
Definition
SCR_EditableEntityComponent.c:14
SCR_EditableEntityComponent::HasEntityState
bool HasEntityState(EEditableEntityState state)
Definition
SCR_EditableEntityComponent.c:1590
SCR_EditableEntityComponent::GetEntityType
EEditableEntityType GetEntityType(IEntity owner=null)
Definition
SCR_EditableEntityComponent.c:127
int
Definition
int.c:13
Print
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
EEditableEntityType
EEditableEntityType
Defines type of SCR_EditableEntityComponent. Assigned automatically based on IEntity inheritance.
Definition
EEditableEntityType.c:6
EEditableEntityState
EEditableEntityState
Definition
EEditableEntityState.c:38
scripts
Game
Editor
Containers
Attributes
SCR_AIMovementSpeedEditorAttribute.c
Generated by
1.17.0