Graphics Reference
In-Depth Information
The teleportation script will be called via a controller and sensor on the Sphere object. When the sphere
senses that it has collided with a ring, it will run the script. As you saw in Chapter 15, âMaking Things Happen
intheGameEngine,âthewayforanobjecttoberecognizedbyotherobjectsistouseproperties.Forthisreason,
it is necessary to create properties for each of the rings. Add an
int
type property called
port
to each ring,
as shown in
Figure 16-5
.
Give the properties integer values that correspond with the object names.
Torus1
should have a
prop
value of
1
;
Torus2
should have a
prop
value of
2
;
Torus3
should have a
prop
value
of
3
; and so on.