Exercise 3 - Adding an Armoury

Changing the Snapping Distance

We're going to want to work with distances less than one world unit in this exercise, which will be easier if we reduce the snapping distance. Use Window>Model Info to open the Model Info window again, and in the Units section, type 1/4 into the "Enable length snapping" box (it understands fractions). Close the Model Info window.


Adding an Armoury

Let's add another room on the end of the corridor. First we'll zoom out a bit to give us space to work in. Switch to the Zoom tool and drag downwards in the window until you get a view like the following. Pan around if you need to so there's space in the lower right corner of the window.




Switch to the Rectangle tool again and drag out a rectangle from the lower left vertex of the corridor, upward and to the right. Stop when the dimensions are 3" by 2". If you don't get the size exactly right, you can change it by typing into the Dimensions box immediately after you finish drawing the rectangle.



Now use the Push-Pull tool  to drag the rectangle upwards. While dragging, move the cursor near one of the upper wall vertices and it will snap to that height. This is an easy way of making a room the same height as an adjacent room.




Hide the new ceiling face, then select and delete the face between the corridor and the new room (shown highlighted in the view below).



Since we created the new room "from scratch", it hasn't inherited textures from anywhere. Let's take the opportunity to put some different textures in this room. Pick something you think would look good on the walls of an armoury.

Remember to texture the ceiling as well (which will take some view rotation and hiding/unhiding as we did for the first room).

Now let's make a shelf to put some ammo on. Adjust the view until you see the back wall, and use the Pencil tool to draw a horizontal line along it half way up. To help you with this, the cursor will snap to the middle of the vertical edges at each end of the wall and display a "Midpoint" prompt. It's important to make sure you're snapped to these points properly, because the line you're drawing must be horizontal in order to result in valid map geometry.




Now use the Push-Pull tool to drag the upper half of the wall out to a distance of 1/2".


The part we've just dragged out will need to become a separate Marathon polygon, so we'll have to divide up the ceiling and walls. Unhide the ceiling and use the Pencil tool to draw three lines as follows:

1. Draw a line from the vertex where the green dot is below up to where the red dot is. A blue line should appear while you're drawing, indicating that you're moving direcly along the blue (vertical) axis. 2. From there, draw another line along the ceiling to the far end. A green line should appear, indicating that you're moving directly along the green axis.3. Rotate around so you can see the other end, and draw a third line downwards. A blue line should appear again.

The result should look like this:


Placing Items

Time to put some ammo in our armoury. Hide both parts of the new ceiling and rotate the view so you can see the shelf clearly. Now Copy and Paste the pistol ammo object from Objects.skp and position it on the shelf near one end.



An armoury with only one box of ammo in it wouldn't be very impressive, so we'd better add some more. However, before you go copying another one out of Objects.skp, there's a better way.

The ammo object you just pasted in is a component instance, and when you pasted it in, the corresponding component definition was pasted in as well. To see the component definitions in the model, use the Window>Components menu command to bring up the Components window.



Here you can see the ammo object, as well as the Pfhor fighter and the Player that we added earlier. (The set square that we deleted right at the beginning is still there too, as a definition that doesn't currently have any instances. It's not doing any harm, but if you want, you can get rid of it by pulling down a menu from the funny little button and choosing Purge Unused.)

While we're looking at the Components window, it's worth having a look at how these components are set up. Click on the ammo in the Components window, and look up the top. You'll see that its Name is "Magnum Ammo" and its Description is *Item,2. The name is only for your own reference, but the Description is important, because that's how the export script knows what Marathon object it corresponds to.

The general format of the description is *<type>,<n> where <type> is Monster, Scenery or Item, and <n> is a number identifying a particular object of that type. For monsters and items, <n> corresponds to the order of the items in the relevant menu in Forge, starting at 1. For scenery, the numbers aren't particularly obvious, you just have to know them. For Marathon 2/Infinity, the numbers are listed here.



To add an instance of a component, you can drag it from the Components window onto the model window. Let's do that now to put some more ammo items on our shelf.



That should be enough. At this point you should be able to export the map and try it out. When you've picked up all that ammo and you're looking for something to do with it, it's time to move on to Exercise 4.

---