Player Kill Streak

Edited -

Ok i what kill streak system. For everytime you reach a sertain kill streak you get something new to help you. Kind of like rewards. Can someone help me with this?

Old Question -

Ok, in my fps game i would like it so that when you kill a sertain number of people without dying in a row, you will get something to help you. If you get 3 everyone on your radar shows up. If you get 5 you get Airstrike, if you get 7 kills you get a support package, get 8 you get a turrent that shoots enemies from its spot, if you get 10 you will recieve 7 attack dogs, and if you get 13, you recieve 13 exp + helicopter you can control. So when you get helicopter you change from the player and you get into helicopter and you can kill other enemies for 1 minute. A enemy can shoot you if you called in a helicopter but, if you die. Then your kill streak must end and must start over. Can anyone help me with this?

If you're only after the kill-streak system it's really easy to implement, after that you're not far away from giving the player achievements based on that streak number. Based on your comment request, here's a method I would consider:

1, Create a timer that goes to a specific number after each kill. The timer always wants to reach 0. This could be an invoke to not eat unnecessary CPU-cycles such as:

static var killTimer=0;

function Update() {
InvokeRepeating ("Countdown", 1.0, 1.0);
}

function Countdown() {
if (--killTimer == 0) CancelInvoke ("Countdown");
}

From the enemyscript you call killStreak.killTimer=5; and the clock starts ticking down.

2, To the killStreak script you add an int of checking how many dudes you've busted under this particular time the countdown is still > 0. This could be a static var killCount : int which you add to if the killTimer is called while > 0. When killTimer==0 you reset killCount as well.

3, If killCount > 1 you could put a GUI-text with the number showing how many kills has been made during the killCount and later add if(killCount>=3)radar.active=true;.

Remember to keep things simple, narrow down every step and go through them keeping in mind what the next step should be. Then you'll do just fine!