Shooter tutorial |
Top Previous Next |
This month we will add two armor packs and a biped enemy to our game. I am using the level that was included in the aum53.zip code last month, so make sure that you use it as well.
We are soon going to face a furious enemy, so we'd better get some armor first. Add an armor.mdl model to the level in the area that is indicated by the red circle.
I have set the scale of the model to 1.5 but you can use any other value. Right click the model, choose "Properties" and you will see the following window:
Attach the action named "PlBipedWeap00_ArmP" to the model:
Set Amount__015 to 50 (each armor pack will give the player 50 armor points) and Spin__015 (the rotation speed) to 3.
Duplicate the armor pack; place the second armor model as indicated in the picture below.
Now build the level (update the entities) and run it; you should see the rotating armor packs.
Add the badguy.mdl model to the level, as indicated in the screenshot below; set its pan to about 170 degrees.
Click the "behavior" tab, and then attach the action named "AIFPS01_Guard" to the enemy.
Dismiss this window, right click the enemy again and this time choose "Behavior".
We will make quite a few changes to this guy. But first, fire up Med and get the shooting vertex number: it is 686 for the badguy.mdl model.
Take a look at the modified "Behavior" panel.
Don't forget that you can click "?" and then one of the fields to find out what it does; however, I'll discuss the changes.
1) First of all, I have lowered the ForceX value; this means that the enemy will walk slower towards the player. Why did I do that? The model doesn't have a "run while shooting" animation, so it would simply slide on the floor; the smaller ForceX value makes it look more natural. 2) The "attack" animation speed was increased a lot because the enemy fires many bullets per second. 3) The enemy shoots using the 2nd weapon, generating the bullets from its 686th vertex and firing bullets several times a second.
Enough talk! Don't forget to press "Save" and then run the level again.
The enemy is pretty tough but (fortunately) the armor pack will protect you for a few seconds.
|