‪Black Ops 3 Source Code Explorer  0.1
‪An script explorer for Black Ops 3 by ZeRoY
archetype_locomotion_utility.gsc
Go to the documentation of this file.
1 #using scripts\shared\ai_shared;
2 #using scripts\shared\ai\systems\animation_state_machine_utility;
3 #using scripts\shared\ai\systems\behavior_state_machine;
4 #using scripts\shared\ai\systems\behavior_tree_utility;
5 #using scripts\shared\ai\systems\blackboard;
6 #using scripts\shared\ai\archetype_cover_utility;
7 #using scripts\shared\ai\archetype_utility;
8 #using scripts\shared\math_shared;
9 
10 #insert scripts\shared\ai\systems\animation_state_machine.gsh;
11 #insert scripts\shared\ai\systems\behavior.gsh;
12 #insert scripts\shared\ai\systems\behavior_state_machine.gsh;
13 #insert scripts\shared\ai\systems\behavior_tree.gsh;
14 #insert scripts\shared\ai\systems\blackboard.gsh;
15 #insert scripts\shared\ai\utility.gsh;
16 #insert scripts\shared\shared.gsh;
17 
18 #namespace AiUtility;
19 
20 // Use this utility if AI moves around using pathfinding should not be archetype dependent at all
21 // SUMEET TODO - add cover specific blackboard variables here.
22 
24 {
25  ‪BT_REGISTER_API( "locomotionBehaviorCondition", &‪locomotionBehaviorCondition );
26  ‪BSM_REGISTER_CONDITION( "locomotionBehaviorCondition", &‪locomotionBehaviorCondition );
27 
28  ‪BT_REGISTER_API( "nonCombatLocomotionCondition", &‪nonCombatLocomotionCondition );
29 
30  ‪BT_REGISTER_API( "setDesiredStanceForMovement", &‪setDesiredStanceForMovement );
31  ‪BT_REGISTER_API( "clearPathFromScript", &‪clearPathFromScript );
32 
33  // ------- PATROL -----------//
34  ‪BT_REGISTER_API( "locomotionShouldPatrol", &‪locomotionShouldPatrol );
35  ‪BSM_REGISTER_CONDITION( "locomotionShouldPatrol", &‪locomotionShouldPatrol );
36 
37  // ------- TACTICAL WALK -----------//
38  ‪BT_REGISTER_API( "shouldTacticalWalk", &‪AiUtility::shouldTacticalWalk );
40 
41  ‪BT_REGISTER_API( "shouldAdjustStanceAtTacticalWalk", &‪shouldAdjustStanceAtTacticalWalk );
42  ‪BT_REGISTER_API( "adjustStanceToFaceEnemyInitialize", &‪adjustStanceToFaceEnemyInitialize );
43  ‪BT_REGISTER_API( "adjustStanceToFaceEnemyTerminate", &‪adjustStanceToFaceEnemyTerminate );
44 
45  ‪BT_REGISTER_API( "tacticalWalkActionStart", &‪tacticalWalkActionStart );
46  ‪BSM_REGISTER_API( "tacticalWalkActionStart", &‪tacticalWalkActionStart);
47 
48  // ------- ARRIVAL -----------//
49  ‪BT_REGISTER_API( "clearArrivalPos", &‪clearArrivalPos );
50  ‪BSM_REGISTER_API("clearArrivalPos", &‪clearArrivalPos);
51 
52  ‪BT_REGISTER_API( "shouldStartArrival", &‪shouldStartArrivalCondition );
54 
55  // ------- TRAVERSAL -----------//
56  ‪BT_REGISTER_API( "locomotionShouldTraverse", &‪locomotionShouldTraverse );
57  ‪BSM_REGISTER_CONDITION( "locomotionShouldTraverse", &‪locomotionShouldTraverse );
58 
59  ‪BT_REGISTER_ACTION( "traverseActionStart", &‪traverseActionStart, undefined, undefined );
60  ‪BSM_REGISTER_CONDITION( "traverseSetup", &‪traverseSetup );
61 
62  ‪BT_REGISTER_API( "disableRepath", &‪disableRepath );
63  ‪BT_REGISTER_API( "enableRepath", &‪enableRepath );
64 
65  // ------- JUKE -----------//
66  ‪BT_REGISTER_API( "canJuke", &‪canJuke );
67  ‪BT_REGISTER_API( "chooseJukeDirection", &‪chooseJukeDirection );
68 
69  // ------- PAIN -----------//
70  ‪BSM_REGISTER_CONDITION( "locomotionPainBehaviorCondition", &‪locomotionPainBehaviorCondition );
71 
72  // ------- STAIRS -----------//
73  ‪BSM_REGISTER_CONDITION( "locomotionIsOnStairs", &‪locomotionIsOnStairs );
74  ‪BSM_REGISTER_CONDITION( "locomotionShouldLoopOnStairs", &‪locomotionShouldLoopOnStairs );
75  ‪BSM_REGISTER_CONDITION( "locomotionShouldSkipStairs", &‪locomotionShouldSkipStairs );
76 
77  ‪BSM_REGISTER_API( "locomotionStairsStart", &‪locomotionStairsStart );
78  ‪BSM_REGISTER_API( "locomotionStairsEnd", &‪locomotionStairsEnd );
79 
80  ‪BT_REGISTER_API( "delayMovement", &‪delayMovement );
81  ‪BSM_REGISTER_API( "delayMovement", &‪delayMovement );
82 }
83 
84 // ------- STAIRS -----------//
85 function private ‪locomotionIsOnStairs( behaviorTreeEntity )
86 {
87  startNode = behaviorTreeEntity.traverseStartNode;
88  if ( IsDefined( startNode ) && behaviorTreeEntity ShouldStartTraversal() )
89  {
90  if( IsDefined( startNode.animscript ) && IsSubStr( ToLower( startNode.animscript ), "stairs" ) )
91  return true;
92  }
93 
94  return false;
95 }
96 
97 function private ‪locomotionShouldSkipStairs( behaviorTreeEntity )
98 {
99  assert( IsDefined( behaviorTreeEntity._stairsStartNode ) && IsDefined( behaviorTreeEntity._stairsEndNode ) );
100 
101  numTotalSteps = ‪Blackboard::GetBlackBoardAttribute( behaviorTreeEntity, ‪STAIRCASE_NUM_TOTAL_STEPS );
102  stepsSoFar = ‪Blackboard::GetBlackBoardAttribute( behaviorTreeEntity, ‪STAIRCASE_NUM_STEPS );
103 
104  direction = ‪Blackboard::GetBlackBoardAttribute( behaviorTreeEntity, ‪STAIRCASE_DIRECTION );
105 
106  if( direction != ‪STAIRCASE_UP )
107  {
108  return false;
109  }
110 
111  numOutSteps = 2;
112  totalStepsWithoutOut = numTotalSteps - numOutSteps;
113 
114  if( stepsSoFar >= ( totalStepsWithoutOut ) )
115  {
116  return false;
117  }
118 
119  remainingSteps = totalStepsWithoutOut - stepsSoFar;
120 
121  if( remainingSteps >=3 || remainingSteps >= 6 || remainingSteps >= 8 )
122  {
123  return true;
124  }
125 
126  return false;
127 }
128 
129 function private ‪locomotionShouldLoopOnStairs( behaviorTreeEntity )
130 {
131  assert( IsDefined( behaviorTreeEntity._stairsStartNode ) && IsDefined( behaviorTreeEntity._stairsEndNode ) );
132 
133  numTotalSteps = ‪Blackboard::GetBlackBoardAttribute( behaviorTreeEntity, ‪STAIRCASE_NUM_TOTAL_STEPS );
134  stepsSoFar = ‪Blackboard::GetBlackBoardAttribute( behaviorTreeEntity, ‪STAIRCASE_NUM_STEPS );
135  exitType = ‪Blackboard::GetBlackBoardAttribute( behaviorTreeEntity, ‪STAIRCASE_EXIT_TYPE );
136  direction = ‪Blackboard::GetBlackBoardAttribute( behaviorTreeEntity, ‪STAIRCASE_DIRECTION );
137 
138  numOutSteps = 2; // 2 steps out unless we are going up
139  if( direction == ‪STAIRCASE_UP )
140  {
141  switch( exitType )
142  {
145  numOutSteps = 3;
146  break;
149  numOutSteps = 4;
150  break;
151  }
152  }
153 
154  if( stepsSoFar >= ( numTotalSteps - numOutSteps ) )
155  {
156  behaviorTreeEntity SetStairsExitTransform();
157  return false;
158  }
159 
160  return true;
161 }
162 
163 function private ‪locomotionStairsStart( behaviorTreeEntity )
164 {
165  startNode = behaviorTreeEntity.traverseStartNode;
166  endNode = behaviorTreeEntity.traverseEndNode;
167 
168  assert( IsDefined( startNode ) && IsDefined( endNode ) );
169 
170  behaviorTreeEntity._stairsStartNode = startNode;
171  behaviorTreeEntity._stairsEndNode = endNode;
172 
173  if( startNode.type == "Begin" )
174  direction = ‪STAIRCASE_DOWN;
175  else
176  direction = ‪STAIRCASE_UP;
177 
178  ‪Blackboard::SetBlackBoardAttribute( behaviorTreeEntity, ‪STAIRCASE_TYPE, behaviorTreeEntity._stairsStartNode.animscript );
180  ‪Blackboard::SetBlackBoardAttribute( behaviorTreeEntity, ‪STAIRCASE_DIRECTION, direction );
181 
182  numTotalSteps = undefined;
183 
184  if( IsDefined( startNode.script_int ) )
185  {
186  numTotalSteps = int( endNode.script_int );
187  }
188  else if( IsDefined( endNode.script_int ) )
189  {
190  numTotalSteps = int( endNode.script_int );
191  }
192 
193  // Set total number of steps
194  assert( IsDefined( numTotalSteps ) && IsInt( numTotalSteps ) && numTotalSteps > 0 );
195  ‪Blackboard::SetBlackBoardAttribute( behaviorTreeEntity, ‪STAIRCASE_NUM_TOTAL_STEPS, numTotalSteps );
196 
197  // so far, we have not taken any steps
199 
200  exitType = undefined;
201  if ( direction == ‪STAIRCASE_UP )
202  {
203  switch( int( behaviorTreeEntity._stairsStartNode.script_int ) % 4 )
204  {
205  case 0: exitType = ‪STAIRCASE_UP_EXIT_R_3_STAIRS; break;
206  case 1: exitType = ‪STAIRCASE_UP_EXIT_R_4_STAIRS; break;
207  case 2: exitType = ‪STAIRCASE_UP_EXIT_L_3_STAIRS; break;
208  case 3: exitType = ‪STAIRCASE_UP_EXIT_L_4_STAIRS; break;
209  }
210  }
211  else
212  {
213  switch( int( behaviorTreeEntity._stairsStartNode.script_int ) % 2 )
214  {
215  case 0: exitType = ‪STAIRCASE_DOWN_EXIT_L_2_STAIRS; break;
216  case 1: exitType = ‪STAIRCASE_DOWN_EXIT_R_2_STAIRS; break;
217  }
218  }
219  ‪Blackboard::SetBlackBoardAttribute( behaviorTreeEntity, ‪STAIRCASE_EXIT_TYPE, exitType );
220 
221  return true;
222 }
223 
224 function private ‪locomotionStairLoopStart( behaviorTreeEntity )
225 {
226  assert( IsDefined( behaviorTreeEntity._stairsStartNode ) && IsDefined( behaviorTreeEntity._stairsEndNode ) );
227 
229 }
230 
231 function private ‪locomotionStairsEnd( behaviorTreeEntity )
232 {
233  ‪Blackboard::SetBlackBoardAttribute( behaviorTreeEntity, ‪STAIRCASE_STATE, undefined );
234  ‪Blackboard::SetBlackBoardAttribute( behaviorTreeEntity, ‪STAIRCASE_DIRECTION, undefined );
235 }
236 
237 // ------- PAIN -----------//
238 function private ‪locomotionPainBehaviorCondition( entity )
239 {
240  return ( entity HasPath() && entity HasValidInterrupt("pain") );
241 }
242 
243 function ‪clearPathFromScript( behaviorTreeEntity )
244 {
245  behaviorTreeEntity ClearPath();
246 }
247 
248 function private ‪nonCombatLocomotionCondition( behaviorTreeEntity )
249 {
250  if( !behaviorTreeEntity HasPath() )
251  return false;
252 
253  if( ‪IS_TRUE( behaviorTreeEntity.accurateFire ) )
254  return true;
255 
256 
257  if( IsDefined( behaviorTreeEntity.enemy ) )
258  return false;
259 
260  return true;
261 }
262 
263 function private ‪combatLocomotionCondition( behaviorTreeEntity )
264 {
265  if( !behaviorTreeEntity HasPath() )
266  return false;
267 
268  // AI's like snipers will not fire when on the move.
269  if( ‪IS_TRUE( behaviorTreeEntity.accurateFire ) )
270  return false;
271 
272 
273 
274  if( IsDefined( behaviorTreeEntity.enemy ) )
275  return true;
276 
277  return false;
278 }
279 
280 function ‪locomotionBehaviorCondition( behaviorTreeEntity )
281 {
282  return behaviorTreeEntity HasPath();
283 }
284 
285 function private ‪setDesiredStanceForMovement( behaviorTreeEntity )
286 {
288  {
290  }
291 }
292 
293 // ------- TRAVERSAL -----------//
294 function private ‪locomotionShouldTraverse( behaviorTreeEntity )
295 {
296  startNode = behaviorTreeEntity.traverseStartNode;
297  if ( IsDefined( startNode ) && behaviorTreeEntity ShouldStartTraversal() )
298  {
299  return true;
300  }
301 
302  return false;
303 }
304 
305 function ‪traverseSetup( behaviorTreeEntity )
306 {
307  // TODO(David Young 7-25-14): This is really weird that we have to set the stance before taking a traversal.
309  ‪Blackboard::SetBlackBoardAttribute( behaviorTreeEntity, ‪TRAVERSAL_TYPE, behaviorTreeEntity.traverseStartNode.animscript );
310 
311  return true;
312 }
313 
314 function ‪traverseActionStart( behaviorTreeEntity, asmStateName )
315 {
316  ‪traverseSetup( behaviorTreeEntity );
317 
318  /#
319  // Assert if no animation is found for the given traversal.
320  animationResults = behaviorTreeEntity ASTSearch( IString( asmStateName ) );
321 
322  assert( IsDefined( animationResults[ ‪ASM_ALIAS_ATTRIBUTE ] ),
323  behaviorTreeEntity.archetype
324  + " does not support traversal of type "
325  + behaviorTreeEntity.traverseStartNode.animscript
326  + " \n@"
327  + behaviorTreeEntity.traverseStartNode.origin
328  + "\n"
329  );
330  #/
331 
332  ‪AnimationStateNetworkUtility::RequestState( behaviorTreeEntity, asmStateName );
333  return ‪BHTN_RUNNING;
334 }
335 
336 function private ‪disableRepath( entity )
337 {
338  entity.disableRepath = true;
339 }
340 
341 function private ‪enableRepath( entity )
342 {
343  entity.disableRepath = false;
344 }
345 
346 // ------- ARRIVAL BEHAVIOR -----------//
347 function ‪shouldStartArrivalCondition( behaviorTreeEntity )
348 {
349  if( behaviorTreeEntity ShouldStartArrival() )
350  return true;
351 
352  return false;
353 }
354 
355 /*
357 "Function Name: ClearArrivalPos \n"
358 <br/>"Summary: Clear arrival planning to a cover.\n"
359 <br/>"Mandatory Argument(s): \n"
360 <br/>"Optional Argument(s): \n"
361 "Module: Behavior \n"
363 */
364 function ‪clearArrivalPos( behaviorTreeEntity )
365 {
366  // TODO(David Young 7-13-15): Default to clearing the path, until new executables post and "isarrivalpending" is available to script.
367  if ( !IsDefined( behaviorTreeEntity.isarrivalpending ) || ‪IS_TRUE( behaviorTreeEntity.isarrivalpending ) )
368  {
369  self ClearUsePosition();
370  }
371 
372  return true;
373 }
374 
375 function ‪delayMovement( entity )
376 {
377  entity PathMode( "move delayed", false, RandomFloatRange( 1, 2 ) );
378 
379  return true;
380 }
381 
382 // ------- LOCOMOTION - TACTICAL WALK -----------//
383 function private ‪shouldAdjustStanceAtTacticalWalk( behaviorTreeEntity )
384 {
385  stance = ‪Blackboard::GetBlackBoardAttribute( behaviorTreeEntity, ‪STANCE );
386  if( stance != ‪DEFAULT_MOVEMENT_STANCE )
387  {
388  return true;
389  }
390 
391  return false;
392 }
393 
394 function private ‪adjustStanceToFaceEnemyInitialize( behaviorTreeEntity )
395 {
396  // AI's standing up out of cover should not play a reaction.
397  behaviorTreeEntity.newEnemyReaction = false;
398 
400  behaviorTreeEntity OrientMode( "face enemy" );
401 
402  return true;
403 }
404 
405 function private ‪adjustStanceToFaceEnemyTerminate( behaviorTreeEntity )
406 {
408 }
409 
410 function private ‪tacticalWalkActionStart( behaviorTreeEntity )
411 {
412  ‪AiUtility::clearArrivalPos( behaviorTreeEntity );
413 
414  ‪AiUtility::resetCoverParameters( behaviorTreeEntity );
415  ‪AiUtility::setCanBeFlanked( behaviorTreeEntity, false );
416 
418  behaviorTreeEntity OrientMode( "face enemy" );
419 
420  return true;
421 }
422 
423 // ------- LOCOMOTION - JUKE -----------//
424 
425 function private ‪validJukeDirection( entity, entityNavMeshPosition, forwardOffset, lateralOffset )
426 {
427  jukeNavmeshThreshold = 6;
428 
429  forwardPosition = entity.origin + lateralOffset + forwardOffset;
430  backwardPosition = entity.origin + lateralOffset - forwardOffset;
431 
432  forwardPositionValid = IsPointOnNavMesh( forwardPosition, entity ) && TracePassedOnNavMesh( entity.origin, forwardPosition );
433  backwardPositionValid = IsPointOnNavMesh( backwardPosition, entity ) && TracePassedOnNavMesh( entity.origin, backwardPosition );
434 
435  if ( !IsDefined( entity.ignoreBackwardPosition ) )
436  {
437  return forwardPositionValid && backwardPositionValid;
438  }
439  else
440  {
441  return forwardPositionValid;
442  }
443 
444  return false;
445 }
446 
447 function ‪calculateJukeDirection( entity, entityRadius, ‪jukeDistance )
448 {
449  jukeNavmeshThreshold = 6;
450  defaultDirection = "forward";
451 
452  if ( IsDefined( entity.defaultJukeDirection ) )
453  {
454  defaultDirection = entity.defaultJukeDirection;
455  }
456 
457  if ( IsDefined( entity.enemy ) )
458  {
459  navmeshPosition = GetClosestPointOnNavMesh( entity.origin, jukeNavmeshThreshold );
460 
461  if ( !IsVec( navmeshPosition ) )
462  {
463  return defaultDirection;
464  }
465 
466  vectorToEnemy = entity.enemy.origin - entity.origin;
467  vectorToEnemyAngles = VectorToAngles( vectorToEnemy );
468  forwardDistance = AnglesToForward( vectorToEnemyAngles ) * entityRadius;
469  rightJukeDistance = AnglesToRight( vectorToEnemyAngles ) * ‪jukeDistance;
470 
471  preferLeft = undefined;
472 
473  if ( entity HasPath() )
474  {
475  // Juke closer to the path goal position.
476  rightPosition = entity.origin + rightJukeDistance;
477  leftPosition = entity.origin - rightJukeDistance;
478 
479  preferLeft = DistanceSquared( leftPosition, entity.pathgoalpos ) <=
480  DistanceSquared( rightPosition, entity.pathgoalpos );
481  }
482  else
483  {
484  preferLeft = ‪math::cointoss();
485  }
486 
487  if ( preferLeft )
488  {
489  if ( ‪validJukeDirection( entity, navmeshPosition, forwardDistance, -rightJukeDistance ) )
490  {
491  return "left";
492  }
493  else if ( ‪validJukeDirection( entity, navmeshPosition, forwardDistance, rightJukeDistance ) )
494  {
495  return "right";
496  }
497  }
498  else
499  {
500  if ( ‪validJukeDirection( entity, navmeshPosition, forwardDistance, rightJukeDistance ) )
501  {
502  return "right";
503  }
504  else if ( ‪validJukeDirection( entity, navmeshPosition, forwardDistance, -rightJukeDistance ) )
505  {
506  return "left";
507  }
508  }
509  }
510 
511  return defaultDirection;
512 }
513 
514 function private ‪calculateDefaultJukeDirection( entity )
515 {
516  ‪jukeDistance = 30;
517  entityRadius = 15;
518 
519  if ( IsDefined( entity.jukeDistance ) )
520  {
521  ‪jukeDistance = entity.jukeDistance;
522  }
523 
524  if ( IsDefined( entity.entityRadius ) )
525  {
526  entityRadius = entity.entityRadius;
527  }
528 
529  return ‪AiUtility::calculateJukeDirection( entity, entityRadius, ‪jukeDistance );
530 }
531 
532 function ‪canJuke( entity )
533 {
534  // Don't juke if the enemy is too far away.
535  if (‪IS_TRUE(self.is_disabled))
536  return false;
537 
538 
539  if ( IsDefined( entity.jukeMaxDistance ) && IsDefined( entity.enemy ) )
540  {
541  maxDistSquared = entity.jukeMaxDistance * entity.jukeMaxDistance;
542 
543  if ( Distance2DSquared( entity.origin, entity.enemy.origin ) > maxDistSquared )
544  {
545  return false;
546  }
547  }
548 
551 
552  return ‪jukeDirection != "forward";
553 }
554 
555 function ‪chooseJukeDirection( entity )
556 {
559 
561 }
‪chooseJukeDirection
‪function chooseJukeDirection(entity)
Definition: archetype_locomotion_utility.gsc:555
‪enableRepath
‪function private enableRepath(entity)
Definition: archetype_locomotion_utility.gsc:341
‪canJuke
‪function canJuke(entity)
Definition: archetype_locomotion_utility.gsc:532
‪disableRepath
‪function private disableRepath(entity)
Definition: archetype_locomotion_utility.gsc:336
‪locomotionShouldSkipStairs
‪function private locomotionShouldSkipStairs(behaviorTreeEntity)
Definition: archetype_locomotion_utility.gsc:97
‪BT_REGISTER_API
‪#define BT_REGISTER_API(name, function)
Definition: behavior.gsh:1
‪locomotionStairLoopStart
‪function private locomotionStairLoopStart(behaviorTreeEntity)
Definition: archetype_locomotion_utility.gsc:224
‪STAIRCASE_LOOP
‪#define STAIRCASE_LOOP
Definition: blackboard.gsh:350
‪locomotionBehaviorCondition
‪function locomotionBehaviorCondition(behaviorTreeEntity)
Definition: archetype_locomotion_utility.gsc:280
‪locomotionPainBehaviorCondition
‪function private locomotionPainBehaviorCondition(entity)
Definition: archetype_locomotion_utility.gsc:238
‪STAIRCASE_NUM_STEPS
‪#define STAIRCASE_NUM_STEPS
Definition: blackboard.gsh:374
‪BSM_REGISTER_API
‪#define BSM_REGISTER_API(name, scriptFunction)
Definition: behavior_state_machine.gsh:17
‪STAIRCASE_DOWN_EXIT_L_2_STAIRS
‪#define STAIRCASE_DOWN_EXIT_L_2_STAIRS
Definition: blackboard.gsh:357
‪STAIRCASE_UP_EXIT_R_4_STAIRS
‪#define STAIRCASE_UP_EXIT_R_4_STAIRS
Definition: blackboard.gsh:356
‪STAIRCASE_TYPE
‪#define STAIRCASE_TYPE
Definition: blackboard.gsh:347
‪BHTN_RUNNING
‪#define BHTN_RUNNING
Definition: behavior_tree.gsh:9
‪cointoss
‪function cointoss()
Definition: math_shared.csc:171
‪resetCoverParameters
‪function resetCoverParameters(behaviorTreeEntity)
Definition: archetype_cover_utility.gsc:430
‪STAIRCASE_UP_EXIT_L_4_STAIRS
‪#define STAIRCASE_UP_EXIT_L_4_STAIRS
Definition: blackboard.gsh:354
‪SetBlackBoardAttribute
‪function SetBlackBoardAttribute(entity, attributeName, attributeValue)
Definition: blackboard.gsc:56
‪clearArrivalPos
‪function clearArrivalPos(behaviorTreeEntity)
Definition: archetype_locomotion_utility.gsc:364
‪setCanBeFlanked
‪function setCanBeFlanked(behaviorTreeEntity, canBeFlanked)
Definition: archetype_cover_utility.gsc:559
‪IS_TRUE
‪#define IS_TRUE(__a)
Definition: shared.gsh:251
‪GetBlackBoardAttribute
‪function GetBlackBoardAttribute(entity, attributeName)
Definition: blackboard.gsc:32
‪locomotionStairsEnd
‪function private locomotionStairsEnd(behaviorTreeEntity)
Definition: archetype_locomotion_utility.gsc:231
‪setDesiredStanceForMovement
‪function private setDesiredStanceForMovement(behaviorTreeEntity)
Definition: archetype_locomotion_utility.gsc:285
‪nonCombatLocomotionCondition
‪function private nonCombatLocomotionCondition(behaviorTreeEntity)
Definition: archetype_locomotion_utility.gsc:248
‪STAIRCASE_STATE
‪#define STAIRCASE_STATE
Definition: blackboard.gsh:348
‪STAIRCASE_NUM_TOTAL_STEPS
‪#define STAIRCASE_NUM_TOTAL_STEPS
Definition: blackboard.gsh:373
‪calculateJukeDirection
‪function calculateJukeDirection(entity, entityRadius, jukeDistance)
Definition: archetype_locomotion_utility.gsc:447
‪tacticalWalkActionStart
‪function private tacticalWalkActionStart(behaviorTreeEntity)
Definition: archetype_locomotion_utility.gsc:410
‪STANCE
‪#define STANCE
Definition: blackboard.gsh:36
‪shouldAdjustStanceAtTacticalWalk
‪function private shouldAdjustStanceAtTacticalWalk(behaviorTreeEntity)
Definition: archetype_locomotion_utility.gsc:383
‪DESIRED_STANCE
‪#define DESIRED_STANCE
Definition: blackboard.gsh:18
‪locomotionIsOnStairs
‪function private locomotionIsOnStairs(behaviorTreeEntity)
Definition: archetype_locomotion_utility.gsc:85
‪STAIRCASE_UP_EXIT_R_3_STAIRS
‪#define STAIRCASE_UP_EXIT_R_3_STAIRS
Definition: blackboard.gsh:355
‪STAIRCASE_UP
‪#define STAIRCASE_UP
Definition: blackboard.gsh:370
‪traverseSetup
‪function traverseSetup(behaviorTreeEntity)
Definition: archetype_locomotion_utility.gsc:305
‪shouldTacticalWalk
‪function shouldTacticalWalk(behaviorTreeEntity)
Definition: archetype_utility.gsc:2232
‪locomotionStairsStart
‪function private locomotionStairsStart(behaviorTreeEntity)
Definition: archetype_locomotion_utility.gsc:163
‪DEFAULT_MOVEMENT_STANCE
‪#define DEFAULT_MOVEMENT_STANCE
Definition: blackboard.gsh:281
‪locomotionShouldTraverse
‪function private locomotionShouldTraverse(behaviorTreeEntity)
Definition: archetype_locomotion_utility.gsc:294
‪STAIRCASE_DOWN
‪#define STAIRCASE_DOWN
Definition: blackboard.gsh:371
‪locomotionShouldPatrol
‪function locomotionShouldPatrol(behaviorTreeEntity)
Definition: archetype_utility.gsc:2461
‪adjustStanceToFaceEnemyTerminate
‪function private adjustStanceToFaceEnemyTerminate(behaviorTreeEntity)
Definition: archetype_locomotion_utility.gsc:405
‪STAIRCASE_EXIT_TYPE
‪#define STAIRCASE_EXIT_TYPE
Definition: blackboard.gsh:352
‪TRAVERSAL_TYPE
‪#define TRAVERSAL_TYPE
Definition: blackboard.gsh:116
‪STAIRCASE_START
‪#define STAIRCASE_START
Definition: blackboard.gsh:349
‪shouldStartArrivalCondition
‪function shouldStartArrivalCondition(behaviorTreeEntity)
Definition: archetype_locomotion_utility.gsc:347
‪locomotionShouldLoopOnStairs
‪function private locomotionShouldLoopOnStairs(behaviorTreeEntity)
Definition: archetype_locomotion_utility.gsc:129
‪jukeDistance
‪var jukeDistance
Definition: archetype_apothicon_fury.gsc:1168
‪clearPathFromScript
‪function clearPathFromScript(behaviorTreeEntity)
Definition: archetype_locomotion_utility.gsc:243
‪calculateDefaultJukeDirection
‪function private calculateDefaultJukeDirection(entity)
Definition: archetype_locomotion_utility.gsc:514
‪STAIRCASE_DOWN_EXIT_R_2_STAIRS
‪#define STAIRCASE_DOWN_EXIT_R_2_STAIRS
Definition: blackboard.gsh:358
‪BSM_REGISTER_CONDITION
‪#define BSM_REGISTER_CONDITION(name, scriptFunction)
Definition: behavior_state_machine.gsh:14
‪jukeDirection
‪var jukeDirection
Definition: archetype_apothicon_fury.gsc:1167
‪ASM_ALIAS_ATTRIBUTE
‪#define ASM_ALIAS_ATTRIBUTE
Definition: animation_state_machine.gsh:22
‪combatLocomotionCondition
‪function private combatLocomotionCondition(behaviorTreeEntity)
Definition: archetype_locomotion_utility.gsc:263
‪STAIRCASE_DIRECTION
‪#define STAIRCASE_DIRECTION
Definition: blackboard.gsh:369
‪delayMovement
‪function delayMovement(entity)
Definition: archetype_locomotion_utility.gsc:375
‪JUKE_DIRECTION
‪#define JUKE_DIRECTION
Definition: blackboard.gsh:133
‪traverseActionStart
‪function traverseActionStart(behaviorTreeEntity, asmStateName)
Definition: archetype_locomotion_utility.gsc:314
‪RegisterBehaviorScriptFunctions
‪function autoexec RegisterBehaviorScriptFunctions()
Definition: archetype_locomotion_utility.gsc:23
‪RequestState
‪function RequestState(entity, stateName)
Definition: animation_state_machine_utility.gsc:8
‪STAIRCASE_UP_EXIT_L_3_STAIRS
‪#define STAIRCASE_UP_EXIT_L_3_STAIRS
Definition: blackboard.gsh:353
‪BT_REGISTER_ACTION
‪#define BT_REGISTER_ACTION(name, initFunction, updateFunction, terminateFunction)
Definition: behavior.gsh:4
‪validJukeDirection
‪function private validJukeDirection(entity, entityNavMeshPosition, forwardOffset, lateralOffset)
Definition: archetype_locomotion_utility.gsc:425
‪adjustStanceToFaceEnemyInitialize
‪function private adjustStanceToFaceEnemyInitialize(behaviorTreeEntity)
Definition: archetype_locomotion_utility.gsc:394