Graphics Reference
In-Depth Information
targ value by one (+1). When the targ value reaches 5, a Property logic brick of the Assign type is used to
assign the value of 1 to the targ property, resetting it.
The logic for this is shown in Figure 15-27 .
Figure 15-26 Bad-guy increment logic
Figure 15-27 Bad-guy node-reset logic
The final bad-guy logic will toggle the clockwise/counterclockwise direction of the bad guys by increment-
ing the inc value. This will happen whenever the bad guy runs into an object with a bump property (this of
course includes other bad-guy objects). Because they are dynamic objects, the bad guys could bump against
each other and be thrown off course or could be pushed into a position where they cannot reach the next path
node. In this case, it is desirable to add a random switch so that from time to time they change directions arbit-
rarily. In this way, they are much more likely to free themselves if they become jammed somewhere, and it also
leads to less-predictable patterns of movement.
 
 
 
Search WWH ::




Custom Search