Autoplay
Browser-side autoplay controller for a slot UI: it fires one spin per auto round and stops on a round count, a win, a low balance, a feature or a jurisdiction rule. It never reaches the RGS, which sees each auto round as an ordinary spin.
Wire Spin to the same input your Spin button drives; it fires once per auto round. Wire the end-of-round signal into Round Complete: the Pixi Reel Controller Done or On All Stopped, or Reel Stop Watcher All Stopped. Feed the round's win into Last Win, the player's balance into Balance, a free-spins or bonus flag into Feature Triggered, and the autoplay permission from Jurisdiction Rules into Allowed (Jurisdiction).
Start arms spins rounds, sets Active true and Remaining to the count, and fires Spin at once. Each Round Complete adds one to Spins Done, takes one off Remaining and checks the stop conditions; when none applies the next Spin fires after delayMs (default 600 ms; 0 fires it in the same update). Start while a run is active is ignored, and Round Complete while idle is ignored.
The stop conditions are checked in this order after every round, and the first match ends the run with that stopReason:
not-allowed— Allowed (Jurisdiction) is false.feature— Stop On Feature is on and Feature Triggered is true.win— Stop On Any Win is on and Last Win is above 0, or Last Win is above Stop On Win Above (0 = off).balance— Balance is below Stop On Balance Below (0 = off).count— Remaining has reached 0.manual— Stop was fired during the run.
Stopped fires once per run with the reason in Stop Reason, and Active goes false. When Allowed (Jurisdiction) is false, Start fires Stopped with not-allowed straight away instead of spinning, and a run already in progress ends the same way; if the permission turns false mid-run, the run ends at the next Round Complete. Start with Spins at 0 ends at once with count. Stop while idle does nothing.
Reset Feature Triggered and Last Win upstream when a new round starts, or a stale value re-triggers the same stop next round. The node compares Last Win, Balance and their thresholds as plain numbers, so keep them in the same units (minor units is the platform convention). The delay timer is cleared on stop and when the node is deleted.
Inputs
Actions
| Signal | Description |
|---|---|
| Start | Arms spins rounds and fires Spin at once; ignored while a run is active; fires Stopped not-allowed when Allowed is false. |
| Stop | Ends the current run with stopReason manual; does nothing while idle. |
| Round Complete | Fire once per finished round; counts the spin, checks the stop conditions and schedules the next Spin. |
Settings
| Data | Description |
|---|---|
| Spins (number) | Number of auto rounds per run, whole number. Default 10. |
| Delay Between Spins (ms) (number) | Wait between Round Complete and the next Spin, ms. Default 600; 0 spins in the same update. |
Stop Conditions
| Data | Description |
|---|---|
| Stop On Any Win (boolean) | Stop after any round whose Last Win is above 0. Default false. |
| Stop On Win Above (0 = off) (number) | Stop when Last Win exceeds this amount, same units as Last Win. Default 0 = off. |
| Stop On Balance Below (0 = off) (number) | Stop when Balance drops below this amount, same units as Balance. Default 0 = off. |
| Stop On Feature (boolean) | Stop when Feature Triggered is true at round end. Default true. |
Round Data
| Data | Description |
|---|---|
| Last Win (number) | The finished round's win, checked at Round Complete. Default 0; reset it upstream each round. |
| Balance (number) | The player's current balance, checked at Round Complete. Default 0. |
| Feature Triggered (boolean) | True when the round triggered free spins or a bonus. Default false; reset it upstream each round. |
Rules
| Data | Description |
|---|---|
| Allowed (Jurisdiction) (boolean) | Jurisdiction gate. Default true; false refuses Start and ends a running run at the next Round Complete. |
Outputs
Signals
| Signal | Description |
|---|---|
| Spin | Fires once per auto round; wire it to the input your Spin button drives. |
| Stopped | Fires once when a run ends, for any reason; read Stop Reason. |
State
| Data | Description |
|---|---|
| Remaining (number) | Rounds still to play in this run; counts down at each Round Complete. |
| Active (boolean) | True from Start until the run stops. |
| Stop Reason (string) | Why the last run ended: not-allowed, feature, win, balance, count or manual; empty while running. |
| Spins Done (number) | Rounds completed in the current or last run. |
Usage
- Wire Spin to the input your Spin button already drives.
- Wire the controller's On All Stopped (or Done) into Round Complete.
- Wire the total win from Calculate Winnings into Last Win, the balance into Balance and the free-spins flag into Feature Triggered; clear all three when a new round starts.
- Wire the autoplay permission from Jurisdiction Rules into Allowed (Jurisdiction).
- Fire Start from the autoplay button and Stop from its stop state.
- Show Remaining on the button and disable the manual Spin button while Active is true.
The RGS knows nothing about autoplay. Each auto round is an ordinary spin request, so bet checks, balance updates and round tracking are exactly what they are for a manual spin.