- Home /
Time Function in Javascript?
Is there a function that makes it so after a certain amount of seconds it will trigger an event? Im trying to make a scene where the robot runs over a trigger, starts an audio clip lasting 40 seconds and after the 40 seconds opens a door behind the player. Some thing like
Function Time(40);
Is that what it is? That was just a wild guess. Thanks for your replys.
hello would this function be affected if the person changed the time on their computer? Or say even using Time.time ins$$anonymous$$d? @AngryAnt
Answer by AngryAnt · Aug 12, 2010 at 01:41 PM
Use Invoke for delayed invocations of methods. For example:
Invoke ("FunctionName", 40);
For more information, see the documentation of Invoke.
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Unity crashing when function runs 1 Answer
Increase health smoothly not instantly? 2 Answers
Unity php functions 1 Answer
Delaying a dynamic Variable(transform.position for Ex.) 2 Answers