- Home /
Timer activates script
I am currently working on a game, in which there is a man who stares at you. I want it so after every couple minutes or so, he gets closer to the player. I already have the script that gets him closer, but can someone show me how to make a script that activates other scripts after a period of time?
Comment
Answer by Dee Va · Jul 22, 2012 at 06:08 AM
var time : float;
function Update()
{
time -= Time.deltaTime;
if(time < 0.0)
{
GetComponent(scriptname).enabled = true;
}
}
I think this Work's :D
Your answer
Follow this Question
Related Questions
AI Script Problem, Horror Game 0 Answers
How to create a basic follow AI 1 Answer
Mouse Aiming Follow Wrong Direction - Help 2 Answers