|
I'm trying to create a function that will run for a certain amount of time then stop or return on the enter of a trigger. I can't seem to figure out how I'd structure that function to just return how long its been since the trigger was hit. I want to run this function for a set amount of time then make it stop in the most efficient way possible. Any ideas?
(comments are locked)
|
|
Have OnTriggerEnter be a coroutine: Thanks a bunch this is what I was trying to do.
Dec 06 '10 at 03:59 AM
user-7131 (google)
(comments are locked)
|
|
This should do the trick: Putting Invoke in Update will cause a new instance of TimedFunction to be created every frame.
Dec 06 '10 at 01:35 AM
Eric5h5
Right you are - you could place a if(timerBool = true) statement before the Invoke
Dec 06 '10 at 01:10 PM
oliver-jones
(comments are locked)
|
(comments are locked)
|
