Description

Using a switch to create a simple tick counter.

Inputs and Outputs


Global Script

var value=0;

Main Script

if(tick){
  ++value;
}
if(reset){
  value=0;
}
output_1 = value;

Preview

Example of Simple Counter with Javascript node

Need more help with this?
Don’t hesitate to contact us here.

Thanks for your feedback.