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_StressTestGroupActivation.c
Go to the documentation of this file.
1
class
SCR_StressTestGroupActivationClass
: GenericEntityClass
2
{
3
}
4
5
class
SCR_StressTestGroupActivation :
GenericEntity
6
{
7
[
Attribute
( defvalue:
"1.0"
, uiwidget:
UIWidgets
.Slider,
desc
:
"Activate groups every [s]"
,
params
:
"0 5 0.1"
)]
8
float
m_fNextGroupTime;
9
10
ref
private
array<IEntity> m_entities = {};
11
private
int
m_iIndex
;
12
private
float
m_fTimeElapsed
;
13
14
//------------------------------------------------------------------------------------------------
15
// constructor
18
void
SCR_StressTestGroupActivation(IEntitySource src,
IEntity
parent)
19
{
20
SetEventMask
(
EntityEvent
.INIT |
EntityEvent
.FRAME);
21
SetFlags
(
EntityFlags
.ACTIVE,
false
);
22
}
23
24
//------------------------------------------------------------------------------------------------
25
override
void
EOnInit
(
IEntity
owner)
26
{
27
BaseWorld world =
GetGame
().GetWorld();
28
if
(world)
29
world.GetActiveEntities(m_entities);
30
m_iIndex
= 0;
31
m_fTimeElapsed
= 0;
32
}
33
34
//------------------------------------------------------------------------------------------------
35
override
void
EOnFrame
(
IEntity
owner,
float
timeSlice)
36
{
37
if
(
m_fTimeElapsed
> m_fNextGroupTime)
38
{
39
for
(
int
i =
m_iIndex
, length = m_entities.Count(); i < length; i++)
40
{
41
SCR_AIGroup
group =
SCR_AIGroup
.Cast(m_entities[i]);
42
if
(group)
43
{
44
if
(DiagMenu.GetBool(
SCR_DebugMenuID
.DEBUGUI_AI_PRINT_GROUP_INFO))
45
PrintFormat
(
"Group %1 activated at location %2"
,group,group.GetOrigin());
46
47
group.
SpawnUnits
();
48
m_iIndex
= i + 1;
49
m_fTimeElapsed
= 0;
50
break
;
51
}
52
if
(i == m_entities.Count() - 1)
53
{
54
ClearEventMask
(
EntityEvent
.FRAME);
55
if
(DiagMenu.GetBool(
SCR_DebugMenuID
.DEBUGUI_AI_PRINT_GROUP_INFO))
56
Print
(
"SCR_StressTestGroup: activation of groups completed"
);
57
}
58
}
59
}
60
61
m_fTimeElapsed
+= timeSlice;
62
}
63
}
SCR_DebugMenuID
SCR_DebugMenuID
This enum contains all IDs for DiagMenu entries added in script.
Definition
DebugMenuID.c:4
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
SCR_AIGroup
void SCR_AIGroup(IEntitySource src, IEntity parent)
Definition
SCR_AIGroup.c:5764
m_iIndex
int m_iIndex
Definition
SCR_CharacterQuickBarSerializer.c:10
m_fTimeElapsed
float m_fTimeElapsed
Definition
SCR_MineAwarenessComponent.c:9
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
params
category params
Definition
SCR_SpherePointGeneratorPreviewComponent.c:21
IEntity
enum EVehicleType IEntity
GenericEntity
Definition
GenericEntity.c:16
IEntity::SetEventMask
proto external EntityEvent SetEventMask(EntityEvent e)
IEntity::EOnInit
void EOnInit(IEntity owner)
IEntity::EOnFrame
void EOnFrame(IEntity owner, float timeSlice)
IEntity::ClearEventMask
proto external EntityEvent ClearEventMask(EntityEvent e)
IEntity::SetFlags
proto external EntityFlags SetFlags(EntityFlags flags, bool recursively=false)
SCR_AIGroup::SpawnUnits
void SpawnUnits()
Definition
SCR_AIGroup.c:2581
SCR_StressTestGroupActivationClass
Definition
SCR_StressTestGroupActivation.c:2
UIWidgets
Definition
attributes.c:40
Print
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
PrintFormat
proto void PrintFormat(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL, LogLevel level=LogLevel.NORMAL)
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
EntityEvent
EntityEvent
Various entity events.
Definition
EntityEvent.c:14
EntityFlags
EntityFlags
Various entity flags.
Definition
EntityFlags.c:14
scripts
Game
GameMode
PrefabsSpawning
SCR_StressTestGroupActivation.c
Generated by
1.17.0