Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_AIGroupMovementComponent.c
Go to the documentation of this file.
2{}
3
4// includes debugs of the subgroups
5class SCR_AIGroupMovementComponent : AIGroupMovementComponent
6{
7 //---------------------------------------------------------------------------------------------------
9 {
10 int bgColors[8] = {
11 Color.DARK_RED,
12 Color.DARK_GREEN,
13 Color.DARK_BLUE,
14 Color.DARK_CYAN,
15 Color.DARK_MAGENTA,
16 Color.DARK_YELLOW,
17 Color.DODGER_BLUE,
18 Color.VIOLET
19 };
20 const int bgColorsCount = 8;
21
22 array<AIAgent> members = {};
23 myGroup.GetAgents(members);
24
25 foreach (AIAgent agent : members)
26 {
27 IEntity e = agent.GetControlledEntity();
28 if (!e)
29 continue;
30 int handleId = GetAgentMoveHandlerId(agent);
31 int bgColor;
32 vector textPos = e.GetOrigin() + Vector (0, 0.5, 0);
33 string strFtType = myGroup.ToString().Substring(8,11);
34 string text;
35 if (handleId == DEFAULT_HANDLER_ID)
36 {
37 text = string.Format("%1 default", strFtType);
38 bgColor = 0x00000000;
39 }
40 else
41 {
42 text = string.Format("%1 SubGr: %2", strFtType, handleId);
43 bgColor= bgColors[handleId % bgColorsCount];
44 }
45 if (GetHandlerLeaderAgent(handleId) == agent)
46 text += " L";
47
48 DebugTextWorldSpace.Create(GetGame().GetWorld(), text, DebugTextFlags.ONCE | DebugTextFlags.CENTER | DebugTextFlags.FACE_CAMERA,
49 textPos[0], textPos[1], textPos[2], color: Color.WHITE, bgColor: bgColor,
50 size: 13.0);
51 }
52 }
53}
ArmaReforgerScripted GetGame()
Definition game.c:1398
int size
SCR_AIGroupMovementComponentClass AIGroupMovementComponentClass DiagDrawSubgroups(SCR_AIGroup myGroup)
enum EVehicleType IEntity
Definition Color.c:13
proto external vector GetOrigin()
AIGroupMovementComponentClass DEFAULT_HANDLER_ID
proto AIAgent GetHandlerLeaderAgent(int handlerId=0)
proto external int GetAgentMoveHandlerId(notnull AIAgent agent)
DebugTextFlags
proto native vector Vector(float x, float y, float z)