Configuration of the taxi
The taxi is the central sprite on the screen. It is - so to speak - you, the player. Just like the passengers from a configuration point of view, it is mostly a collection of animations. One noteable difference is, that for all animations, "file_pattern_left" and "file_pattern_right" may be used. I.e. the taxi may look different, depending on whether it is going (or was last going) to the left or to the right. You may however also simply use the "file_pattern"-attribute for taxis or animations that look the same in both directions. For simplicity, the given examples will use animations that look the same in both directions.
An here it is:
<!DOCTYPE taxi_data > <document author="Thomas Friedrichsmeier" title="AirCab 301" >
Once again, the "author"- and "title"-attributes will be shown in the credits for any mission that uses this taxi.
<still frames="1" file_pattern="taxi1/still0000.png" />
This is the animation (or in this case still image) the taxi is doing all of the time (if not doing idle-actions or teleporting). Of the additional animation-parameters, only "anim_oscillating" (default="false") may be used. You may also specify a sound for this animation. Available sound-parameters are "continuous" (default="false") and "interruptable" (default="false").
<idle> <data frames="6" file_pattern="taxi1/idle1_%1.png" repetitions="2"> <sound file="taxi1/idle1.wav" /> </data> <data frames="5" file_pattern="taxi1/idle2_%1.png" repetitions="3" anim_frame_period="100" /> ... </idle>
Even while flying, the taxi may do "idle"-animations. So obviously this term is not quite correct, but it's in analogy to the passengers' idle-animations (see there for more in-depth explanation). The available additional parameters are: "repetitions" (default="1") and "anim_oscillating" (default="false") for the animations and "repetitious" (default="false") for the 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", a static image and no sound, if you don't want any idle animations.
<flying_left frames="2" file_pattern="taxi1/flying_left%1.png"> <sound file="taxi1/fly.wav"/> </flying_left> <flying_right frames="2" file_pattern="taxi1/flying_right%1.png"> <sound file="taxi1/fly.wav"/> </flying_right> <flying_up frames="2" file_pattern="taxi1/flying_up%1.png"> <sound file="taxi1/fly.wav"/> </flying_up> <flying_down frames="2" file_pattern="taxi1/flying_down%1.png"> <sound file="taxi1/fly.wav"/> </flying_down>
The meaning of these should be easy to guess. They change your taxi's appearance when you accelerate with the cursor keys. These are not independend images however, but really these images are just draw over the taxi image (so it can continue doing it's idle-stuff). Technically these are a different sprite. Have a look at the animations provided in the distribution, if you can't see, what I'm trying to say.
By the way, hitting something with these "flying-animations" doesn't crash your taxi, that means they are not to be understood as part of the taxi itself. They are however harmful to the passenger.
<teleporting frames="10" file_pattern="taxi1/teleporting%1.png" />
This is really the same as for the passenger. See there for details.
<landing_flaps offset_x1="3" offset_x2="30" />
This tag was introduced in Version 0.4.2, and specifies the x-positions of the taxi's landing-flaps (Is this the correct term? The poles, you stand on when landed, is what I mean) relative to the left corner of the taxi-sprite. If you omit this tag, the very left and right pixels of your taxi will be assumed as the position of the landing-flaps. This may result in the taxi crashing, when landing close to the platforms edges, while it actually looks to the player like the taxi is properly standing on the platform. So you should really specify these attributes.
Starting with Version 0.4.3 you may also create taxis with moveable landing-flaps. For those, the landing_flaps-tag would look like this:
<landing_flaps offset_x1="3" offset_x2="30" moveable="true" frames="6" file_pattern="taxi2/flaps%1.png" blocking="false"> <sound file_a="taxi2/flaps_out.wav" file_b="taxi2/flaps_in.wav"/> </landing_flaps>
Note that the offset-attributes do NOT change their meaning in this context. The flaps-image is always aligned top-left with the taxi-image. Have a look at taxi2 and its images. The boolean attribute "blocking" specifies, whether you can still accelerate left/right with the landing-flaps out (false, default, if you are able to do so), or whether left/right-acceleration is blocked with the flaps out.
For the sound, note once more, that two sound-files may be given (as shown in the example), one for moving the flaps out and one for drawing the in. The animation, however, will simply be reversed (same as for teleporting).
For direction-dependend animations (i.e. using "file_pattern_left" and "file_pattern_right"), you'll possibly also want to adjust the "offset_x1" and "offset_x2"-attribute according to the direction. Simply use "offset_x1_left", "offset_x1_right" etc., if the x-position of your landing-flaps changes with flying-direction.
Last modified: Apr 03 2005 17:50 (GMT)