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_GetOutGroupCommand.c
Go to the documentation of this file.
1
[
BaseContainerProps
()]
2
class
SCR_GetOutGroupCommand
:
SCR_WaypointGroupCommand
3
{
4
//------------------------------------------------------------------------------------------------
5
override
bool
Execute(
IEntity
cursorTarget,
IEntity
target,
vector
targetPosition,
int
playerID,
bool
isClient)
6
{
7
if
(isClient && playerID ==
SCR_PlayerController
.
GetLocalPlayerId
())
8
{
9
//SpawnWPVisualization(targetPosition, playerID);
10
return
true
;
11
}
12
13
//SpawnWPVisualization(targetPosition, playerID);
14
if
(!
m_sWaypointPrefab
|| !target || !targetPosition)
15
return
false
;
16
17
return
GetOutAtVehiclePosition(target, playerID);
18
}
19
20
bool
GetOutAtVehiclePosition(
IEntity
target,
int
playerID)
21
{
22
SCR_AIGroup
group =
SCR_AIGroup
.Cast(target);
23
if
(!group)
24
return
false
;
25
26
array<SCR_ChimeraCharacter> aiMembers = {};
27
aiMembers = group.
GetAIMembers
();
28
if
(aiMembers.IsEmpty())
29
return
false
;
30
31
CompartmentAccessComponent compartmentComp;
32
IEntity
vehicleIn;
33
34
foreach
(SCR_ChimeraCharacter character : aiMembers)
35
{
36
if
(character && character.IsInVehicle())
37
{
38
compartmentComp = character.GetCompartmentAccessComponent();
39
if
(!compartmentComp)
40
continue
;
41
42
vehicleIn = compartmentComp.GetVehicleIn(character);
43
if
(vehicleIn)
44
break
;
45
}
46
}
47
48
if
(!vehicleIn)
49
return
false
;
50
51
return
SetWaypointForAIGroup
(target, vehicleIn.
GetOrigin
(), playerID);
52
}
53
}
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
IEntity
Definition
IEntity.c:13
IEntity::GetOrigin
proto external vector GetOrigin()
SCR_AIGroup
Definition
SCR_AIGroup.c:75
SCR_AIGroup::GetAIMembers
array< SCR_ChimeraCharacter > GetAIMembers()
Definition
SCR_AIGroup.c:2650
SCR_GetOutGroupCommand
Definition
SCR_GetOutGroupCommand.c:3
SCR_PlayerController
Definition
SCR_PlayerController.c:31
SCR_PlayerController::GetLocalPlayerId
static int GetLocalPlayerId()
Returns either a valid ID of local player or 0.
Definition
SCR_PlayerController.c:481
SCR_WaypointGroupCommand
Definition
SCR_WaypointGroupCommand.c:4
SCR_WaypointGroupCommand::m_sWaypointPrefab
ResourceName m_sWaypointPrefab
Definition
SCR_WaypointGroupCommand.c:6
SCR_WaypointGroupCommand::SetWaypointForAIGroup
bool SetWaypointForAIGroup(IEntity target, vector targetPosition, int playerID)
Definition
SCR_WaypointGroupCommand.c:59
vector
Definition
vector.c:13
scripts
Game
Commanding
Commands
SCR_GetOutGroupCommand.c
Generated by
1.17.0