주 콘텐츠로 건너뛰기

검색

How do I: count time with precision (/an input of time passed)?

  • Mm Bogdan & Matt

    Hi, you're suffering from the fact that the game updates 30 times a second (ie. 0.0333333.. s per frame) which is not a nice decimal update step.
    A simple way to get a variable counting up time is to use a calculator and a variable modifier. You can set your calculator to give a result of 1 divided by 30 and wire that into a variable modifier's "Operation Value". Set the operation type to "Add" and set the Update Type to "Continuous". Every frame it will add 0.0333333...s to the variable which is exactly what you need!
    Hope that helps.
    Matt

  • Supposer

    If you just literally want the current time passed, you can use a timer's current time value as an output.

    If you'd like the timer to go on forever so it never stops itself, you can set the target time to something ahead of the current time. For example: timer's current time > calculator (current time + 1) > timer's target time.

댓글을 남기려면 로그인하세요.