4 protected static const string PORT_REQUEST =
"Request";
5 protected static const string PORT_TARGET_POS =
"TargetPos";
8 protected static const string PORT_POS =
"Pos";
10 protected static const float RANDOM_POS_RADIUS = 2;
13 override ENodeResult EOnTaskSimulate(AIAgent owner,
float dt)
15 IEntity myEntity = owner.GetControlledEntity();
17 return ENodeResult.FAIL;
26 vector ownerPos = myEntity.GetOrigin();
28 vector moveDir =
SCR_AICombatMoveUtils.CalculateMoveDirection(rq.m_eDirection, ownerPos, rq.m_vMovePos);
30 float moveDistance = rq.m_fMoveDistance;
32 vector newPositionCenter = ownerPos + moveDir * moveDistance, newPosition;
34 newPosition = s_AIRandomGenerator.GenerateRandomPointInRadius(0, RANDOM_POS_RADIUS, newPositionCenter,
true);
35 newPosition[1] = newPositionCenter[1];
37 SetVariableOut(PORT_POS, newPosition);
39 return ENodeResult.SUCCESS;
43 protected static ref TStringArray s_aVarsOut = {
46 override TStringArray GetVariablesOut() {
return s_aVarsOut; }
48 protected static ref TStringArray s_aVarsIn = {
51 override TStringArray GetVariablesIn() {
return s_aVarsIn; }
53 override bool VisibleInPalette() {
return true; }