Component:TextCountdownClock

From Resonite Wiki
Revision as of 02:01, 25 April 2024 by Nytra (talk | contribs) (Logix -> ProtoFlux)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Component image 
Text Countdown Clock component as seen in the Scene Inspector


This article or section is a Stub. You can help the Resonite Wiki by expanding it.


Usage

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled.
CountdownTime Double
AllowNegative Bool
TextTarget field drive of String

Behavior

This component creates a Text String in the form of HH:MM:SS as a countdown timer based on the difference in the value of T and the value of CountdownTime.

Examples

I have a button in my world, that when pressed, uses ProtoFlux to grab T and add 900 to it, then sets that value as countdownTime. Thus I get a timer for 15 minutes.

For example, if T is 1200 and I wanted a 3-minute timer, I would need to set CountdownTime to, 1200 + (3 (min) * 60 (seconds)), 1380. and it would output a string of 3:00. Throw that in a Text Field of a Text Render and then you get a Visible Countdown.

See Also