Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_LootDeadBodyAction.c
Go to the documentation of this file.
2 {
3  //------------------------------------------------------------------------------------------------
4  override bool CanBeShownScript(IEntity user)
5  {
6  return CanBePerformedScript(user);
7  }
8 
9  //------------------------------------------------------------------------------------------------
10  override bool CanBePerformedScript(IEntity user)
11  {
12  ChimeraCharacter char = ChimeraCharacter.Cast(GetOwner());
13  if (!char)
14  return false;
15 
16  // Disallow looting when alive
17  CharacterControllerComponent contr = char.GetCharacterController();
18  if (!contr)
19  return false;
20 
21  if (contr.GetLifeState() == ECharacterLifeState.ALIVE)
22  return false;
23 
24  // Disallow looting when in vehicle
25  IEntity userVeh = CompartmentAccessComponent.GetVehicleIn(char);
26  if (userVeh)
27  return false;
28 
29  return super.CanBePerformedScript(user);
30  }
31 }
ECharacterLifeState
ECharacterLifeState
Definition: ECharacterLifeState.c:12
SCR_LootAction
Definition: SCR_LootAction.c:1
SCR_LootDeadBodyAction
Definition: SCR_LootDeadBodyAction.c:1
GetOwner
IEntity GetOwner()
Owner entity of the fuel tank.
Definition: SCR_FuelNode.c:128