Warhorse ScripBind documentation
ContentsIndexHome
PreviousUpNext
AddPatternBranch
Syntax
C++
int AddPatternBranch(IFunctionHandler * pH);
Parameters 
Description 
nodeName 
name of the node to add the branches. 
method 
The method to choose the next node when the node is reached. Should be one of the following: 
AITRACKPAT_CHOOSE_ALWAYS 
Chooses on node from the list in linear sequence. 
AITRACKPAT_CHOOSE_LESS_DEFORMED 
Chooses the least deformed point in the list. Each node is associated with a deformation value (percentage) which describes how much it was required to move in order to stay within the physical world. These deformation values are summed down to the parent nodes so that deformation at the end of the hierarchy will be caught down the hierarchy. 
AITRACKPAT_CHOOSE_RANDOM 
Chooses one point in the list randomly. 

Syntax: AI.AddPatternBranch( nodeName, method, branchNode1, branchNode2, ..., branchNodeN ) 

Creates a branch pattern at the specified node. When the entity has approached the specified node (nodeName), and it is time to choose a new point, the rules defined by this function will be used to select the new point. This function allows to associate multiple target points and an evaluation rule.

AI.AddPatternBranch( "point1", AITRACKPAT_CHOOSE_ALWAYS, "point2" );

Copyright (c) 2012. All rights reserved.