Shooter template

Top  Previous  Next

This month we'll get to play with 3 different weapons:

 

1. A pistol with a smaller firing range, recoil and virtually unlimited ammo (OK, we only have 100,000 bullets, but who's counting?). The pistol, as you'd expect from any pistol, doesn't have too much precision - take a look at the screenshot below to see what I mean.

 

aum92_templates1

 

2. A machine gun with a higher range, higher precision, a crosshair and a muzzle flare.

 

aum92_templates2

 

3. A sniper gun with a huge range and good precision.

 

aum92_templates3

 

If you're feeling a bit frustrated because you'd like to have a sniper scope, just press and hold the right mouse button and you'll be set.

 

aum92_templates4

 

As you probably know, firing a sniper gun isn't such an easy task because player's hand might be shaking a bit, the wind might be blowing, and so on. OK, I know that your hand isn't shaking at all and the wind isn't blowing in this level, but I took care of that through coding - just use the scope and you'll see ;)

 

Where can we find all these goodies? The pistol is very close to the player at the beginning of the level; since it has all the ammo you'll ever need already, I didn't add an ammo pack for it (the code is included and fully functional, though).

 

aum92_templates5

 

The second weapon was placed behind the house, so take a left after you pick up the pistol and you'll discover the machine gun, as well as an ammo pack for it:

 

aum92_templates6

 

Time to jump over the fence; look around and you'll see the sniper gun and an ammo pack for it:

 

aum92_templates7

 

Finally, move towards the right side of the screen and you'll discover two different ammo packs that should give you enough bullets.

 

aum92_templates8

 

I know that we don't have a full shooter template yet, but here are some of the things that can be edited inside the t_shooter_weapons.c file:

 

var t_shooter_pistol_bullets = 100000; // the pistol has a huge (practically unlimited) number of bullets by default

var t_shooter_mgun_bullets = 20; // stores the initial number of bullets for the machine gun

var t_shooter_sniper_bullets = 10; // stores the initial number of bullets for the sniper gun

 

// default weapon selection keys

STRING* key_weapon1 = "1";

STRING* key_weapon2 = "2";

STRING* key_weapon3 = "3";

 

As you can see, we can use the "1", "2" and "3" keys to toggle the current weapon. Oh, and the digits used for "armor" and "health" on the hud don't change their values because... I know! We don't have any enemies in the level yet! Well, things will hopefully change next month, so I'll see you then!