How to create an animated vehicle

From Blue Mars Developer Guidebook

Jump to: navigation, search
There are security restrictions on this article

Back to Tutorials


Note: Vehicles are not entirely supported yet. This article is for informational purposes only and represents a work in progress

Suppose you want to make a nice turtle that you can get on that will go swimming across the ground in a straight line. Well here is exactly how to do that.

  • 1. Make your model with a skeleton
  • 2. Animate your skeleton
  • 3. Export your model to your level/objects directory. You need to export as .chr (character).
  • 4. Export your bones to your level/animations directory as a .caf file. You should be able to just ignore any errors. They'll be ironed out in a future release. The animation should export fine though.
    • It should be noted that you need to have each of your animations in a separate max file. You'll need to repeat this step for each of them.
  • 5. Create a .cal file. This is just a text document with the same name as the model. It goes in the same directory as your model (your level/objects). You can use the one in the zip as a reference, basically it just allows you to tell the engine where the animation file is and what you want to name it when it is in the engine.
  • 6. Go into the City Editor, click the little stick figure next to the icon for the material editor, this will open the character editor. Load your model, if all went as well you'll get a list of animations on the right with the names you gave them in the cal file. If you click one it should play the animation in the viewer.
  • 7.Now you need to make an entity to load and run that model and animation. In the zip file in the scripts folder is a sample script with full documentation.

One last note, the avatar still walks while riding the turtle, there is a way to disable that but we'll get into that later when we do a tutorial on character animations.

You can actually just unzip File:AnimatedVehicleSample.zip into your level folder and see what the entity does. You'll need to fix the paths in RideableTurtle.ent, seaturtle.cal, and material #76.mtl to point to your own directory.

Problems with this wiki page? Contact us either by: Support Email or Support Ticket System

Blue Mars Guidebook Privacy Policy
Blue Mars Guidebook Community Guidelines

Personal tools