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_Position.c
Go to the documentation of this file.
1
[
EntityEditorProps
(
category
:
"GameScripted/GameMode"
)]
2
class
SCR_PositionClass
: GenericEntityClass
3
{
4
}
5
6
class
SCR_Position
:
GenericEntity
7
{
8
#ifdef WORKBENCH
9
protected
int
m_iColor
=
Color
.WHITE;
10
protected
string
m_sText
=
string
.Empty;
11
12
//------------------------------------------------------------------------------------------------
14
void
SetColorAndText();
15
16
//------------------------------------------------------------------------------------------------
17
override
int
_WB_GetAfterWorldUpdateSpecs(
IEntitySource
src)
18
{
19
return
EEntityFrameUpdateSpecs.CALL_WHEN_ENTITY_VISIBLE;
20
}
21
22
//------------------------------------------------------------------------------------------------
23
override
void
_WB_AfterWorldUpdate(
float
timeSlice)
24
{
25
SetColorAndText();
26
27
vector mat[4];
28
GetWorldTransform(mat);
29
30
// Draw point and arrow
31
vector
position
= mat[3];
32
Shape pointShape = Shape.CreateSphere(
m_iColor
,
ShapeFlags
.ONCE |
ShapeFlags
.NOOUTLINE,
position
, 0.2);
33
Shape arrowShape = Shape.CreateArrow(
position
,
position
+ mat[2], 0.2,
m_iColor
,
ShapeFlags
.ONCE);
34
35
WorldEditorAPI api = _WB_GetEditorAPI();
36
if
(api)
37
{
38
IEntity
selectEntity = api.SourceToEntity(api.GetSelectedEntity());
39
if
(!
SCR_Position
.Cast(selectEntity))
40
return
;
41
}
42
43
if
(!
m_sText
.IsEmpty())
44
{
45
DebugTextWorldSpace textShape = DebugTextWorldSpace.Create(
46
GetWorld(),
47
m_sText
,
48
DebugTextFlags
.ONCE |
DebugTextFlags
.CENTER |
DebugTextFlags
.FACE_CAMERA,
49
position
[0],
50
position
[1] + 0.4,
51
position
[2],
52
20.0,
53
m_iColor
);
54
}
55
}
56
#endif
57
58
//------------------------------------------------------------------------------------------------
59
// constructor
62
void
SCR_Position
(IEntitySource src,
IEntity
parent)
63
{
64
SetEventMask(
EntityEvent
.INIT);
65
SetFlags(
EntityFlags
.STATIC,
true
);
66
}
67
}
EntityEditorProps
enum SCR_ECompassType EntityEditorProps(category:"GameScripted/Gadgets", description:"Compass", color:"0 0 255 255")
Prefab data class for compass component.
Definition
SCR_CompassComponent.c:10
position
vector position
Definition
SCR_DestructibleTreeV2.c:30
SCR_Position
SCR_PositionClass GenericEntityClass SCR_Position(IEntitySource src, IEntity parent)
Definition
SCR_Position.c:62
category
params category
Definition
SCR_VehicleDamageManagerComponent.c:302
IEntity
enum EVehicleType IEntity
Color
Definition
Color.c:13
GenericEntity
Definition
GenericEntity.c:16
IEntitySource
Definition
IEntitySource.c:13
SCR_PositionClass
Definition
SCR_Position.c:3
DebugTextFlags
DebugTextFlags
Definition
DebugTextFlags.c:13
ShapeFlags
ShapeFlags
Definition
ShapeFlags.c:13
EntityEvent
EntityEvent
Various entity events.
Definition
EntityEvent.c:14
EntityFlags
EntityFlags
Various entity flags.
Definition
EntityFlags.c:14
m_iColor
class WidgetType m_iColor
m_sText
string m_sText
Definition
EnWidgets.c:82
scripts
Game
GameMode
Respawn
SCR_Position.c
Generated by
1.17.0