Add time when collecting objects js
Hello everyone. I have a script here which allows me to collect objects and a timer script that when reaches zero moves to a certain scene. But I really need help in adding atleast 5 seconds to every object that is collected. Really appreciate your help guys...
Answer by JamesBrodski · May 24, 2016 at 03:33 AM
I don't know much C#, but i recommend adding another timer when you collect something, like var IncreaseTime : boolean = true; var timer = 0.0 timer += 1;
This means the timer will go up by 1 every frame. (60fps) You needed 5 seconds, so you can do if(timer == 300){IncreaseTime = false}
I hope this helps, sorry if it's complicated. If you showed a picture of video that would be great.
And oh yeah i didn't use c# I used javascript on this one.
Answer by NoirKurosuKai · Jun 14, 2016 at 12:03 PM
@JamBroski I added some pictures hope you or anyone can notice this post and help me really appreciate the help
Your answer
![](https://koobas.hobune.stream/wayback/20220612081313im_/https://answers.unity.com/themes/thub/images/avi.jpg)