3 protected static const string MOVEMENT_TYPE_PORT =
"MovementType";
5 ref SCR_BTParamAssignable<vector> m_vPosition =
new SCR_BTParamAssignable<vector>(
SCR_AIActionTask.POSITION_PORT);
6 ref SCR_BTParam<IEntity> m_Entity =
new SCR_BTParam<IEntity>(
SCR_AIActionTask.ENTITY_PORT);
7 ref SCR_BTParam<bool> m_bUseVehicles =
new SCR_BTParam<bool>(
SCR_AIActionTask.USE_VEHICLES_PORT);
8 ref SCR_BTParam<EMovementType> m_eMovementType =
new SCR_BTParam<EMovementType>(MOVEMENT_TYPE_PORT);
11 void InitParameters(vector
position, IEntity entity,
EMovementType movementType,
bool useVehicles,
float priorityLevel)
22 void SCR_AIMoveActivity(SCR_AIGroupUtilityComponent utility, AIWaypoint relatedWaypoint, vector pos, IEntity ent,
EMovementType movementType =
EMovementType.RUN,
bool useVehicles =
true,
float priority = PRIORITY_ACTIVITY_MOVE,
float priorityLevel = PRIORITY_LEVEL_NORMAL)
24 InitParameters(pos, ent, movementType, useVehicles, priorityLevel);
25 m_sBehaviorTree =
"AI/BehaviorTrees/Chimera/Group/ActivityMove.bt";
26 SetPriority(priority);
30 override string GetActionDebugInfo()
32 return this.ToString() +
" moving to " +
m_vPosition.ValueToString();
36 override void OnActionCompleted()
38 super.OnActionCompleted();
44 group.ReleaseCompartments();
46 SendCancelMessagesToAllAgents();
50 override void OnActionFailed()
52 super.OnActionFailed();
58 group.ReleaseCompartments();
60 SendCancelMessagesToAllAgents();
63 override void OnActionDeselected()
65 super.OnActionDeselected();
66 SendCancelMessagesToAllAgents();
72 void SCR_AISeekAndDestroyActivity(SCR_AIGroupUtilityComponent utility, AIWaypoint relatedWaypoint, vector pos, IEntity ent,
EMovementType movementType =
EMovementType.RUN,
bool useVehicles =
false,
float priority = PRIORITY_ACTIVITY_SEEK_AND_DESTROY,
float priorityLevel = PRIORITY_LEVEL_NORMAL)
75 m_sBehaviorTree =
"AI/BehaviorTrees/Chimera/Group/ActivitySeekDestroy.bt";
78 override string GetActionDebugInfo()
80 return this.ToString() +
" seek and destroy around" +
m_Entity.ValueToString();
86 ref SCR_BTParam<float> m_fCompletionDistance =
new SCR_BTParam<float>(
SCR_AIActionTask.DESIREDDISTANCE_PORT);
89 void SCR_AIFollowActivity(SCR_AIGroupUtilityComponent utility, AIWaypoint relatedWaypoint, vector pos, IEntity ent,
EMovementType movementType =
EMovementType.RUN,
bool useVehicles =
false,
float priority = PRIORITY_ACTIVITY_FOLLOW,
float priorityLevel = PRIORITY_LEVEL_NORMAL,
float distance = 1.0)
91 m_sBehaviorTree =
"AI/BehaviorTrees/Chimera/Group/ActivityFollow.bt";
92 m_fCompletionDistance.Init(
this,
distance);
95 override string GetActionDebugInfo()
97 return this.ToString() +
" following entity " +
m_Entity.ValueToString();