Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AIDecoTestIsInVehicle.c
Go to the documentation of this file.
1 class SCR_AIDecoTestIsInVehicle : DecoratorTestScripted
2 {
3  // this tests if Entity is in vehicle (to be added to other tests - for sole node use "DecoIsInVehicle" node)
4  protected override bool TestFunction(AIAgent agent, IEntity controlled)
5  {
6  if (!controlled)
7  controlled = agent.GetControlledEntity();
8  ChimeraCharacter character = ChimeraCharacter.Cast(controlled);
9  if (!character)
10  return false;
11  return character.IsInVehicle();
12  }
13 };
SCR_AIDecoTestIsInVehicle
Definition: SCR_AIDecoTestIsInVehicle.c:1