Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Oct 23, 2013 at 01:15 AM by meat5000 for the following reason:

The question is self answered

avatar image
0
Question by brandon199511 · Dec 31, 2011 at 09:09 AM · timetimertime.deltatimecountdownseconds

CountDown Timer Help (Seconds problem)

I am trying to make a count down timer from 3 to 0 by seconds. The timer will be displayed on screen. Problem is, I cant find a way to call the timer to run threw a function only once. Instead it calls every single frame.

Here is a list of things I have already tried but failed: InvokeRepeating <- cant seem to get a Time.deltaTime to run when it is called every frame Store variable - variable-- <- Obviously didnt work, but you got to try everything before posting right? Functions <- Didnt work as the function can not be called only once, instead it is called every single frame And much much much more (over 5 hours of trying to get it to work)

Other Info: I am doing this when you dont have enough money it states you don''t have enough and shows the time until automatic cancel.

I feel soooo dumb as this sounds stupid easy, but all in all. I cant find out how to make it run with Time.deltaTime or just run once in a function.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

  • Sort: 
avatar image
1

Answer by brandon199511 · Dec 31, 2011 at 10:19 PM

I fixed it before a moderator even approved the question.

CountDown Here: http://forum.unity3d.com/threads/117533-Timer-Help

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Knightleaf · Dec 31, 2011 at 09:56 AM

what is it for?

you could create a separate variable called cooldown, give it a time of 3 seconds create a function to store your timer have it start at your cooldown variable and when it reaches 0 it goes into your if statement

( all in all, try and implement it outside of the update loop, maybe on start or awake? depending on what you are doing because without knowing what setting its in or seeing the code its kind of hard to give a straight answer :D)

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Time does not start counting down when need to 1 Answer

Coroutine Countdown Timer being extremely slow 1 Answer

Want to load scene after taking off in plane. 1 Answer

Problem with countdown timer. 3 Answers

how to make a varied countdown timer 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges