Difference between revisions of "Timer (LogiX node)"

From Neos Wiki
Jump to navigation Jump to search
(Notes on UpdatingUser edge cases)
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
<languages></languages>
 
<languages></languages>
 
<translate>
 
<translate>
The '''Timer''' node fires impulses from Pulse separated by the number of seconds specified by the Interval input.
+
<!--T:1-->
 +
{{Infobox Logix Node
 +
| Name = Timer
 +
| Image =[[File: TimerNodeNode.png | noframe | 128px | 'Timer' LogiX node ]]
 +
| Input0Type = Float | Input0Name = Interval
 +
| Input1Type = User | Input1Name = UpdatingUser
 +
| Output0Type = Impulse | Output0Name = Pulse
 +
}}
  
<!--[[File:|border|256px|right]]-->
+
<!--T:2-->
 +
The '''Timer''' node fires impulses from <code>Pulse</code> separated by the number of seconds specified by the <code>Interval</code> input.
  
== Inputs & Outputs ==
+
== Usage == <!--T:3-->
{| class="wikitable"
+
Each frame update, this node checks whether a number of seconds greater than or equal to the <code>Interval</code> input have elapsed. If they have, an impulse is fired owned by the <code>UpdatingUser</code>. If no <code>UpdatingUser</code> is provided, the default owner is the world host. If a null </code>UpdatingUser</code> is provided, the node will not fire at all.
|+Inputs
 
|-
 
| Color
 
| Label
 
| Type
 
|-
 
| style="background-color:{{Float-color}}" |
 
| Interval
 
| [[:Category:Types:Float|Float]]
 
|-
 
| style="background-color:{{User-color}}" |
 
| UpdatingUser
 
| [[:Category:Types:User|User]]
 
|}
 
  
{| class="wikitable"
+
=== User Handling === <!--T:6-->
|+Outputs
+
It is '''NOT''' recommended to use '''[[Local_User_(LogiX_node)|Local User]]''' with this node. When [[Local_User_(LogiX_node)|Local User]] is used, it will fire impulses for all users in the session. This is similar to the guidance for [[Fire_On_True_(LogiX_node)| Fire On True]] etc.
|-
 
| Color
 
| Label
 
| Type
 
|-
 
| style="background-color:{{Impulse-color}}" |
 
| Pulse
 
| [[:LogiX:Impulses|Impulse]]
 
|}
 
  
== Usage ==
+
== Examples == <!--T:4-->
The Interval value may be changed between successive impulses from Pulse. If the Interval is increased the next impulse will occur that many seconds after the previous output impulse - e.g. if an impulse is fired from Pulse while the Interval is 10 and then the Interval is changed to 60, the next impulse will fire 60 seconds after the previous one. Conversely, if the Interval value is decreased, the node will only wait until a number of seconds equal to the new value have passed; this means that if the new value is less than the number of seconds since the last output impulse another impulse is fired immediately.
 
  
Impulses are fired locally for the user provided to UpdatingUser. If no UpdatingUser is provided, it will fire for all users, as if you had connected a Local User node. If a null UpdatingUser is provided, the Interval node will not fire at all.
+
== Node Menu == <!--T:5-->
 
 
== Examples ==
 
 
 
== Node Menu ==
 
 
</translate>
 
</translate>
  
[[Category:LogiX|Timer]]
+
[[Category:LogiX{{#translation:}}|Timer]]
[[Category:LogiX: Flow|Timer]]
+
[[Category:LogiX:Flow{{#translation:}}|Timer]]
 
{{:NodeMenu-Flow}}
 
{{:NodeMenu-Flow}}

Latest revision as of 14:30, 19 February 2022

Other languages:
English • ‎日本語
Timer
'Timer' LogiX node
Inputs
  Float Interval
  User UpdatingUser
Outputs
  Impulse Pulse

The Timer node fires impulses from Pulse separated by the number of seconds specified by the Interval input.

Usage

Each frame update, this node checks whether a number of seconds greater than or equal to the Interval input have elapsed. If they have, an impulse is fired owned by the UpdatingUser. If no UpdatingUser is provided, the default owner is the world host. If a null UpdatingUser is provided, the node will not fire at all.

User Handling

It is NOT recommended to use Local User with this node. When Local User is used, it will fire impulses for all users in the session. This is similar to the guidance for Fire On True etc.

Examples

Node Menu

Flow
Back Events Boolean Latch Delay Delay With Value Dynamic Impulse Receiver Dynamic Impulse Receiver With Value`1
Dynamic Impulse Trigger Dynamic Impulse Trigger With Value`1 Fire On Change Fire On False Fire On True Fire While True For
If Impulse Demultiplexer Impulse Multiplexer Local Fire On Change`1 Local Fire On False Local Fire On True Local Impulse Timeout
Local Leaky Impulse Bucket One Per Frame Pulse Random Sequence Timer Update Updates Delay
Updates Delay With Value While