Shooter tutorial

Top  Previous  Next

This time we will get to reach the end of the shooter level. First of all, we have to open another pair of doors.

 

aum56_template1

 

You should be a door expert by now, so I'll just show you the pictures with the settings for the trigger and the two doors from Wed.

 

aum56_template2

 

aum56_template3

 

aum56_template4

 

Now that the doors can open, we should add a couple of angry enemies right there; they would take the innocent player by surprise most of the time. See what I mean?

 

aum56_template5

 

Well, we won't do that; since this is the design stage, we want to be able to advance in the game without too many obstacles. You can do it (if you want to) by simply duplicating the enemy that we have used before. I have made two copies of it (right click it, and then choose "Duplicate") and I have placed them behind the locked doors.

 

I have removed the enemies from the level... Now that the room isn't dangerous anymore, we have to find a way and get to the platform that triggers the switch that calls that mother ship that takes us home that...

 

aum56_template6

 

Ok, we don't have a mother ship, but you could load a new level which shows a space ship taking off. And before you start asking how it is possible to do it, check out Aum27.

 

Let's add a trigger entity in the bright room first:

 

aum56_template11

 

Add a cube close to the console, and then attach it the "Trigger00" action. Use these settings for the trigger:

 

aum56_template12

 

Let's make the elevator look alive! Right click the elevator entity, choose "Properties" and then attach it the action named "Lift01_Basic".

 

aum56_template13

 

Customize the elevator as shown in the picture below. Its z changes from 128 quants to -72 quants; I'll let you figure out by yourself how did I come up with the "-200" figure in the "EndZ" field. Don't forget that the trigger and the lift must share the same ID ("4" in my demo).

 

aum56_template14

 

That's all for now! Build the level (update the entities) and see how the trigger from the bright room starts the elevator. You can now use it to get to the button that calls the mother ship.

 

We will want our special, blue button to trigger a level change, loading a new level; this means that we need to add a new script named Levels (00). Choose File -> Project Manager to bring up the project manager.

 

aum56_template8

 

Click the "Add" tab, select "Levels (00)" in the script field, and then press the "Add Script -=>>" button.

 

aum56_template7

 

We are going to use the "Exit Point" action, which needs to be customized a bit. Click the "Customize" tab, make sure that the "levels00.wdl" script is selected, and then click the "Customize" button; you will see the following window:

 

aum56_template9

 

We need to change the name of the second level from none.wmb to the name of our second level. I have included a test level named second.wmb; it's a small room that contains the player model.

 

aum56_template10

 

Choose "second.wmb"for the second level, press "Save" and then the "Close" button. You can now dismiss this Project Manager window. Add a new cube model to the level, close to the blue button, right click it, choose "Properties", and then attach it the action named Levels00_Exit_Pt.

 

aum56_template15

 

There aren't too many things that need to be customized here:

 

aum56_template16

 

Save, Close and build the level again, updating the entities. Run the game, kill the enemies, trigger the elevator, use it and then approach the blue button. You will find yourself in a small room, our second level.

 

aum56_template17

 

This episode concludes our small template shooter example. Next time we will start to study the template scripts in detail, looking at all the possible options and seeing how they affect the gameplay. If you wanted to have a template-based rocket launcher in your game and didn't know how to do it, don't lose hope - that tutorial is right around the corner.