Vehicles are a popular part of Second Life . This chapter provided recipes that demonstrate land, air and sea vehicles. By setting the vehicle parameter types, the vehicle type and handling characteristics can be specified. There are two very important event handlers in most vehicles.

    The changed event handler is called when an avatar sits on a vehicle. The changed event handler must first determine whether the avatar is authorized to operate the vehicle. Normally, to operate the vehicle, the avatar must be the owner. Next, the event handler starts the vehicle.

    The control event handler is called when the avatar applies pressure to the controls of the vehicle. Normally, a vehicle is moved in the same way as an avatar. The control event handler must process all of the movement requests and apply power to the linear and angular motors.

    The next chapter will introduce recipes for scanners. Scanners can detect avatars around the scanning device. Other types of scanners also gather information about their environment.


Copyright 2005 - 2010 by Heaton Research, Inc.. Heaton Research™ and Encog™ are trademarks of Heaton Research. Click here for copyright and trademark information.