Taxipilot at

Support This Project

Configuration of passengers

Passengers are the creatures you have to transport around. They are easy to configure, but a lot of work to draw. Essentially a number of animations and sounds are specified.

Let's look at the configuration:

<!DOCTYPE passenger_data >
<document author="Thomas Friedrichsmeier" title="Mr. Right">

The "author"- and "title"-attributes will again be shown in the credits for the missions, this passenger appears in.

		<data frames="4" file_pattern="passenger1_idle1_%1.png" repetitions="5" anim_oscillating="true" />
		<data frames="4" file_pattern="passenger1_idle2_%1.png" repetitions="8">
			<sound file="passenger1/idle2.wav" repetitious="true" />

For a detailed description of the parameters, see the sections on animations and on sounds. As indicated in the example, the animation takes the parameters "repetitions" and "anim_oscillating" (see section on animations).

For sounds, the following attributes will be read: "repetitious" (default=false), "pitchable" (default=true), "continuous" (default=false), "interruptable" (default=false) (see section on sounds).

You may define as many idle-animations as you like, but at least one. If you create more than one, the animation will be picked at random. Use frames="1" and a static image, if you don't want any idle animations.

	<walking speed="0.6" frames="14" file_pattern_left="passenger1_walking_left%1.png"
				file_pattern_right="passenger1_walking_right%1.png" anim_frame_period="100">
		<sound file="passenger1/steps.wav" />

This is the animation used for the passenger walking. Note that two file-patterns, "file_pattern_left" and "file_pattern_right" are expected for the passenger walking to the left and to the right, respectively. Of the additional animation-parameters, only "anim_oscillating" can be used. The animation will always be continuos.

The "speed"-attribute is used to sync how many pixels the passenger-sprite is moved, while its frames are animated. Unfortunately, this parameter may be a bit awkward. It specifies the number of pixels, the sprites is moved per 50 milliseconds, while the animation itself may use a completely different frame-period (as specified by "anim_frame_period" (Of course, the timings differ for passengers differing in impatience, but the relation between "speed" and "anim_frame_period" is not affected by this).

The available sound-attributes are: "pitchable" (default=true), "continuous" (default=true), "interruptable" (default=true).

	<teleporting frames="10" file_pattern="passenger1_teleporting%1.png">
		<sound file_a="passenger1/appear.wav" file_b="passenger1/disappear.wav"/>

This animation is used whenever the passenger is teleporting, i.e. once, when the passenger first appears on a platform (played reverse), second, when the passenger disappears into the taxi (forward), and two more times for reappearing and disappearing on the destination platform. No additional animation-parameters can be used.

Since this animation gets reversed for (re)appearing, two sound files may be specified, "file_b" being used for appearing. The available sound-attributes are: "pitchable" (default=true), "interruptable" (default=false).

	<still frames="1" file_pattern="passenger1_still0000.png" />

This animation is played while the passenger is doing nothing, i.e. is visible, but not busy. Most of the time, you'll probably just want to use a static image here (as shown in the example), but if you like, you can also use a regular animation. The only additional animation-parameter that may be used is "anim_oscillating". The animation will always be continuous.

This "do nothing" animation may also have a sound (not shown in the example). The available parameters are: "continuous" (default=true), "interruptable" (default="true") and "pitchable" (default=true).


You may not omit any of the above sections. You may always use frames="1", a constant "file_pattern", and no sound in order to create a very simple passenger, however.

There are a few optional tags, used for sounds, that are not directly related to animations. Those are (as of version 0.8.5):

		<sound file="passenger1/hello_taxi.wav" />
		<sound file="passenger1/byebye.wav" />
		<sound file="passenger1/ouch.wav" />
		<sound file="passenger1/abandoned.wav" />

These sounds are played when the passenger has appeared, when it leaves the taxi after delivery, when it dies, and when it get's abandoned (i.e. taxi takes off again, before the passenger has boarded), respectively. For all these sounds, the only additional attribute that will be read, is "pitchable" (default="true").

Last modified: Apr 03 2005 17:50 (GMT)

SourceForge Logo