im kinda new to unity and i cant figure out how to make a misson like say i want the player to kill a certain amount of targets to move on. does anyone know how to do that if so please help and if you can post the script.
It's not a very hard concept. Here's a very basic example. First class is attached to monster which when dies, just increases count by 1. You'll need to call the OnDeath function obviously when the target dies.
Second class just runs in scene (attach to emtpy object) which just checks every frame if count has reached required count then does complete logic. Note the static Count value.
May have typoes, typed it in notepad
public class MissionMonster : MonoBehaviour
{
void OnDeath()
{
Mission.Count++;
}
}
public class Mission : MonoBehaviour
{
static public int Count;
private const int RequiredKillAmount = 10;
void Update()
{
if (Count >= RequiredKillAmount)
{
// Mission complete
}
}
}