Automated: create new component page |
fill in info |
||
Line 3: | Line 3: | ||
|Name=Authority Time Base | |Name=Authority Time Base | ||
}} | }} | ||
The '''AuthorityTimeBase''' component allows for fine-grained control over the world time with a certain speed and with respect to a given offset. | |||
== | == Fields == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|BaseSpeed|Float| | |BaseSpeed|Float|Speed of the time base. | ||
|_actualSpeed|Float| | |_actualSpeed|Float|Actual speed of the time base. Should not be written to or driven. | ||
|_actualOffset|Double| | |_actualOffset|Double|Offset of the time base from the current world time. Can be written to or driven perfectly fine. | ||
}} | }} | ||
== | == Usage == | ||
The output of the component is the current world time (as a [[Type:Double|Double]]) multiplied by the <code>BaseSpeed</code>, minus the <code>_actualOffset</code>. | |||
The output of the component is accessed by sourcing the component itself. To write to the current time of the component, you write to said source. When writing to the component, <code>_actualOffset</code> is automatically updated to reflect the correct time. | |||
== Examples == | == Examples == | ||
== See Also == | == See Also == | ||
* [[ProtoFlux:WorldTimeDouble|WorldTimeDouble]] | |||
* [[ProtoFlux:WorldTimeFloat|WorldTimeFloat]] | |||
[[Category:Components:Utility{{#translation:}}|Authority Time Base]] | [[Category:Components:Utility{{#translation:}}|Authority Time Base]] | ||
[[Category:Components{{#translation:}}|Authority Time Base]] | [[Category:Components{{#translation:}}|Authority Time Base]] | ||
Revision as of 03:46, 16 March 2024
Component image
The AuthorityTimeBase component allows for fine-grained control over the world time with a certain speed and with respect to a given offset.
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. |
BaseSpeed
|
Float | Speed of the time base. |
_actualSpeed
|
Float | Actual speed of the time base. Should not be written to or driven. |
_actualOffset
|
Double | Offset of the time base from the current world time. Can be written to or driven perfectly fine. |
Usage
The output of the component is the current world time (as a Double) multiplied by the BaseSpeed
, minus the _actualOffset
.
The output of the component is accessed by sourcing the component itself. To write to the current time of the component, you write to said source. When writing to the component, _actualOffset
is automatically updated to reflect the correct time.