7 protected static const string PORT_WEAPON_COMPONENT =
"WeaponComponent";
8 protected static const string PORT_MAGAZINE_COMPONENT =
"MagazineComponent";
9 protected static const string PORT_MUZZLE_ID =
"MuzzleId";
11 protected SCR_AICombatComponent m_CombatComponent;
14 protected int m_MuzzleId;
15 protected BaseMagazineComponent m_MagazineComp;
18 override void OnInit(AIAgent owner)
20 IEntity controlledEnt = owner.GetControlledEntity();
21 m_CombatComponent = SCR_AICombatComponent.Cast(controlledEnt.FindComponent(SCR_AICombatComponent));
25 NodeError(
this, owner,
"SCR_AIEvaluateExpectedWeapon didn't find necessary components!");
30 override ENodeResult EOnTaskSimulate(AIAgent owner,
float dt)
33 return ENodeResult.FAIL;
36 BaseMagazineComponent magazineComp;
42 return ENodeResult.FAIL;
44 SetVariableOut(PORT_WEAPON_COMPONENT, weaponComp);
45 SetVariableOut(PORT_MAGAZINE_COMPONENT, magazineComp);
46 SetVariableOut(PORT_MUZZLE_ID, muzzleId);
48 return ENodeResult.SUCCESS;
52 override bool VisibleInPalette() {
return true; }
54 protected static ref TStringArray s_aVarsOut = {
55 PORT_WEAPON_COMPONENT,
57 PORT_MAGAZINE_COMPONENT
59 override TStringArray GetVariablesOut() {
return s_aVarsOut; }