How Do I...? A M.U.G.E.N primer

Tutorial Part 2 - Collision boxes

M.U.G.E.N, Elecbyte (c)1999-2009
Updated 17 September 2009


Tutorial 1 | 2 | 3 | 4

Introduction

In this part, we will talk about how to define collision boxes for the animations in your character's .air file. The documentation for .air files is in air.html. It's a good idea to read it before proceeding with this tutorial.


1. About Collision Boxes

Once you have put together an animation for the character, you can use AirEditor to define collision boxes. There are two kinds of collision boxes:

Simply put, if one of Player 1's attack boxes overlaps any one of Player 2's hit boxes, then it means Player 1 has hit Player 2.


2. Using AirEditor

AirEditor is a developer tool, and can be found in the old_tools/ directory of your M.U.G.E.N installation. The instructions for using AirEditor are in airedit.txt. When you are ready, run the airedit executable.

Go to File -> Open and choose the sff file you want to load, followed by the accompanying air file. You will now see your character on the screen:

AirEditor screen

Let's explain what you see on the screen.

To define a collision box, simply drag the mouse cursor over the region you want to create a box at. This will be displayed as a bright green box. Click without dragging to make the green box go away. Let's start by defining boxes for KFM's standing frame. First, we'll drag a box to represent his body.

Boxes1 Boxes2

Click on the Save1 button at the bottom of the screen to save that box to memory. Now drag a second box for the head and click on Save2 to save that. Notice how the saved boxes appear in a darker color. If you want to go back and correct one of the saved boxes, simply drag a new green box.

Next, you assign the set of boxes to the current animation element. Click on the corresponding "Set" box in the Collision boxes menu. Repeat the procedure for all the elements in the animation action.

When you are done with your changes, remember to save your .air file. Click on the File menu and choose Save.


3. General Tips



Tutorial 1 | 2 | 3 | 4

Next is Tutorial Part 3