6 protected float MOVE_COMPLETION_RADIUS = 10;
8 static const string AMMO_CONSUMER_ENTITY_PORT =
"AmmoConsumerEntity";
9 static const string MAGAZINE_WELL_TYPE_PORT =
"MagazineWellType";
11 ref SCR_BTParam<IEntity> m_AmmoConsumer =
new SCR_BTParam<IEntity>(AMMO_CONSUMER_ENTITY_PORT);
12 ref SCR_BTParam<typename> m_MagazineWellType =
new SCR_BTParam<typename>(MAGAZINE_WELL_TYPE_PORT);
18 IEntity ammoConsumer,
typename magazineWellType,
float priorityLevel = PRIORITY_LEVEL_NORMAL)
22 m_sBehaviorTree =
"{ADA6E7C5BC3C8C8D}AI/BehaviorTrees/Chimera/Soldier/ProvideAmmo.bt";
24 m_AmmoConsumer.Init(
this, ammoConsumer);
31 m_MoveBehavior =
new SCR_AIMoveIndividuallyBehavior(utility, groupActivity, vector.Zero, priority : movePriority, priorityLevel: priorityLevel, ent: ammoConsumer, radius: 30.0);
32 utility.AddAction(m_MoveBehavior);
36 override float CustomEvaluate()
43 m_MoveBehavior.Fail();
51 override void OnActionCompleted()
53 super.OnActionCompleted();
55 m_MoveBehavior.Complete();
59 override void OnActionFailed()
61 super.OnActionFailed();
63 m_MoveBehavior.Fail();