Hi,
I made a script
using UnityEngine;
using System.Collections;
public class MultiKill : MonoBehaviour {
public int Kill = 0;
public AudioSource DoubleKill;
// Update is called once per frame
void Update ()
{
if (Kill == 2)
{
DoubleKill.Play();
}
else { }
}
}
I use another script on my AI that when health <= 0 Kill += 1;
i also got a timer which check after an enemy has been killed that the kill == 0
When i start the game and i kill 2 enemies, so the count is 2, then nothing happens.
when the timer comes in and set the 2 to 0 then the Doublekill music plays :S
when i shoot 3 enemies and the count is 3 the Doublekill music also plays.
What am i doing wrong here?