Skip to main content

Win Rollup

Counts a win up on screen from 0 to the amount over a set time, with a formatted text string for the banner and a tick signal for a coin sound. Browser only; it never reaches the RGS.

Set Amount (the total win from Calculate Winnings) and fire Start. Value rolls linearly from 0 to the amount over durationMs (default 1500 ms) and Text is rebuilt on every frame as prefix + value fixed to decimals + suffix, ready for a Text node. Running is true while the roll is in progress. Each Start restarts from 0, and an Amount set in the same update is the one rolled.

With Amount In Minor Units on (the default and the platform convention: amounts are integer cents) Value and Text show amount / 100; turn it off for amounts already in display units. Changing Decimals, Prefix, Suffix or Amount In Minor Units re-formats Text at once, even while idle. Decimals is clamped to 0..20.

Tick fires when the roll starts, then at most every tickEveryMs (default 80 ms; 0 = every frame) while rolling, and once more with the final value; wire it to the play input of a coin Sound node. Finished fires after that last tick, once the final value is shown. When Amount is 0 or Duration (ms) is 0 the roll completes in the same update and Finished fires immediately.

Skip To End jumps to the final value while running (wire a tap on the win banner to it); it is ignored while idle. Frames run on the browser's animation frames, or a timer where none exists, and are cancelled when the node is deleted.

Inputs​

Actions​

SignalDescription
StartStarts the roll from 0 to Amount; restarts it if already rolling.
Skip To EndJumps to the final value and fires Finished; ignored while idle.

Value​

DataDescription
Amount (number)The win to count up to, minor units by default. Default 0.

Timing​

DataDescription
Duration (ms) (number)Length of the roll, ms. Default 1500; 0 shows the final value at once.
Tick Every (ms) (number)Minimum gap between Tick signals while rolling, ms. Default 80; 0 ticks every frame.

Format​

DataDescription
Decimals (number)Decimal places in Text, 0..20. Default 2.
Prefix (string)Text placed before the number, for example a currency symbol. Default empty.
Suffix (string)Text placed after the number. Default empty.
Amount In Minor Units (boolean)Divide Amount by 100 for display. Default true.

Outputs​

State​

DataDescription
Value (number)The number currently shown: amount / 100 when Amount In Minor Units is on, else the raw amount.
Text (string)prefix + Value fixed to decimals + suffix, rebuilt every frame.
Running (boolean)True while the roll is in progress.

Signals​

SignalDescription
TickFires at start, at most every tickEveryMs while rolling, and once more with the final value.
FinishedFires once the final value is shown, after the last Tick.

Usage​

  1. Wire the total win into Amount and the round-settled signal (the controller's On All Stopped) into Start.
  2. Wire Text into a Text node on the win banner and show the banner while Running is true.
  3. Wire Tick to the play input of a coin Sound node.
  4. Wire a tap on the banner to Skip To End.
  5. Wire Finished to whatever continues the round, for example Round Complete on Autoplay.
note

A zero win still runs: with Amount 0 the node fires Tick and Finished in the same update as Start, so a graph that waits on Finished also continues on losing rounds.