4 protected static const string PORT_MIN_DISTANCE =
"MinDistance";
5 protected static const string PORT_MAX_DISTANCE =
"MaxDistance";
6 protected static const string PORT_DIRECT_DAMAGE =
"IsDirectDamage";
8 protected SCR_AICombatComponent m_CombatComponent;
11 override void OnInit(AIAgent owner)
13 IEntity controlledEnt = owner.GetControlledEntity();
14 m_CombatComponent = SCR_AICombatComponent.Cast(controlledEnt.FindComponent(SCR_AICombatComponent));
18 NodeError(
this, owner,
"SCR_AIGetCombatComponentWeaponProperties didn't find necessary components!");
29 override ENodeResult EOnTaskSimulate(AIAgent owner,
float dt)
32 return ENodeResult.FAIL;
35 BaseMagazineComponent magazineComp;
38 m_CombatComponent.GetSelectedWeaponAndMagazine(weaponComp, muzzleId, magazineComp);
43 m_CombatComponent.GetSelectedWeaponProperties(minDistance, maxDistance, directDamage);
45 SetVariableOut(PORT_DIRECT_DAMAGE, directDamage);
46 SetVariableOut(PORT_MIN_DISTANCE, minDistance);
47 SetVariableOut(PORT_MAX_DISTANCE, maxDistance);
49 return ENodeResult.SUCCESS;
53 override bool VisibleInPalette()
58 protected static ref TStringArray s_aVarsOut = {
65 override TStringArray GetVariablesOut()