Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
GeneralCinematicTrack.c
Go to the documentation of this file.
1
[
CinematicTrackAttribute
(name:
"General Track"
, description:
"Track used for animating general parameters of entities"
)]
2
class
GeneralCinematicTrack
:
CinematicTrackBase
3
{
4
5
[
Attribute
(
"1.0"
,
params
:
"0.01 1000.0"
)]
6
float
m_bScale;
7
8
[
Attribute
(
"0 0 0"
)]
9
vector
m_YawPitchRoll;
10
11
[
Attribute
(
"0 0 0"
)]
12
vector
m_Position;
13
14
private
GenericEntity
m_GeneralEntity;
15
private
World
globalWorld;
16
17
override
void
OnInit
(
World
world)
18
{
19
// Find particle entity by using name of track
20
findEntity(world);
21
globalWorld = world;
22
}
23
24
void
findEntity(
World
world)
25
{
26
// Find particle entity by using name of track
27
TStringArray
strs =
new
TStringArray
;
28
GetTrackName().Split(
"_"
, strs,
true
);
29
30
if
(strs.Get(0) ==
"player"
)
31
{
32
if
(!
GetGame
().
GetPlayerController
())
33
return
;
34
35
m_GeneralEntity = SCR_ChimeraCharacter.Cast(
GetGame
().
GetPlayerController
().
GetControlledEntity
());
36
37
return
;
38
}
39
40
m_GeneralEntity =
GenericEntity
.Cast(world.FindEntityByName(strs.Get(0)));
41
}
42
43
override
void
OnApply(
float
time)
44
{
45
46
if
(globalWorld)
47
{
48
//Finding effect entity each frame for keep working in edit time
49
findEntity(globalWorld);
50
}
51
52
if
(m_GeneralEntity)
53
{
54
55
//Set Scale
56
m_GeneralEntity.SetScale(m_bScale);
57
58
//Set rotation
59
m_GeneralEntity.SetYawPitchRoll(m_YawPitchRoll);
60
61
vector
mat[4];
62
m_GeneralEntity.GetTransform(mat);
63
mat[3] = m_Position;
64
m_GeneralEntity.SetTransform(mat);
65
66
m_GeneralEntity.Update();
67
}
68
}
69
}
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
params
category params
Definition
SCR_SpherePointGeneratorPreviewComponent.c:21
CinematicTrackAttribute
Definition
attributes.c:3
CinematicTrackBase
Definition
CinematicTrackBase.c:8
GeneralCinematicTrack
Definition
GeneralCinematicTrack.c:3
GenericEntity
Definition
GenericEntity.c:16
World
Definition
World.c:16
vector
Definition
vector.c:13
GetControlledEntity
SCR_EditableEntityComponent GetControlledEntity()
Definition
SCR_EditablePlayerDelegateComponent.c:90
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
GetPlayerController
proto external PlayerController GetPlayerController()
Definition
SCR_PlayerDeployMenuHandlerComponent.c:307
OnInit
@ OnInit
Definition
SndComponentCallbacks.c:17
TStringArray
array< string > TStringArray
Definition
Types.c:385
scripts
Game
Cinematics
GeneralCinematicTrack.c
Generated by
1.17.0