Basically, I want to make an enemy change it’s stats (damage, health, and looks) after a certain period of time. The timer should be based on when the enemy appeared, not on how long the game has been running. Is this possible?
Store “Time.time” when the enemy is created, and compare that to the current game time in Update()
The below code isn’t tested so may contain compile errors but the overall concept remains.
private float startTime = 0f;
public float changeAfterSeconds = 3f;
private bool changed = false;
void Start(){
startTime = Time.time;
}
void Update(){
if(!changed && Time.time > startTime + changeAfterSeconds){
//do things
changed = true;
}
}