Graphics Reference
In-Depth Information
The path nodes are simply red cubes that have been resized to be about the height of the bad-guy character.
As usual in the game engine, do your resizing in Edit mode and leave the object scale at 1. In the Mesh buttons,
I've applied an empty UV texture to make the cones shadeless in the game engine, and I've colored them red
using vertex painting. I suggest you create one first and add the logic described in the next section, and then
copy it three times. Logic bricks are copied along with objects, so this approach will save you having to set up
the logic for each path node individually.
Path Node Logic Bricks
The path nodes will be used to guide the bad guys' movements around the board. At any given time, each bad-
guycharacterwillbesettotracktoasinglenodeandmoveinthedirectionofthatnode.Whenthebadguyruns
intoanode,itwillthenswitchtotrackingtowardthenextnodeinthepath.Whenthebadguyhitsthelastnode,
it will track back to the first node, completing a cycle around the course.
You need to set up some physical characteristics. Specifically, the path nodes should be set as static Ghost
actors, as shown in Figure 15-20 . This will enable them to be passed through by other objects but also ensure
that their collision boundaries are calculated when necessary.
Figure 15-20 Physics for path nodes
Asshownin Figure15-21 , thepathnodeusestwoproperties.YoucanaddthesebyclickingAddGameProp-
erty. Set the property type by using the drop-down menu for the property. Fill in the name and start value of
the property in the appropriate fields. The Info icon button to the right of each property will toggle, displaying
on and off. If the Info icon button is clicked, the property's value will be displayed in-game if the Show Debug
Properties option is chosen from the Game menu on the User Preferences header.
 
 
 
Search WWH ::




Custom Search