Lesson 3

Table of Contents

Defining Options within the Switch Group

Now that you have a Switch Group, you need to further identify which positions within that group are possible. In this case, you want to know all the potential surfaces that the player could be on during game play, and then you must decide on the names you’ll use to describe these surfaces. These names are represented as Switch objects contained within the Material Switch Group you just created. As with the Switch Group, these Switch names must be communicated to the programmer so the game engine can properly communicate which surface the player is walking on.

[Note]

In the case of Cube, the code for the game is already written, so it’s imperative that you double-check that you accurately name Game Syncs or they will not work.

  1. Select the Material Switch Group object you just created, and then click the Create new 'Switch' icon.

  2. Name the Switch object Concrete.

    In Cube, there are a total of nine different materials that our hero might find himself trotting across, so you’ll need to represent each of them in this Switch Group.

  3. Add and name the remaining Switch objects according to the following image.

    Your Switch Group is now ready to receive information from the game engine!

    If you double-click a Switch Group or Switch object, you may notice that the Property Editor displays little information. That’s OK. The primary purpose of these objects is simply to be the receptor for the calls coming from the game engine.

    [Tip]

    If you inspect a Switch Group, you get a Game Parameter graph. This allows you to control the Switch change using a game parameter (RTPC). You’ll learn more about Game Parameter graphs later in this lesson.


Was this page helpful?