Only once, not more than, repeat

Four Special conditions that limit how often a rule runs, or make its actions run several times.

What a gate is

These live in the ⚙ Special column. They are not tests about the game. They are gates on the rule itself. NutHouse checks the rule’s other conditions first, then the gate decides whether the actions may run.

Only the first timeThe event works the first time its other conditions are true, and never again in this level.
Only once while this keeps happeningWorks once when the other conditions become true, then waits until they stop being true.
Not more than once every…A cool-down. Asks for seconds (0.5 to start with). The event cannot work again until that long has passed.
Repeat the actions…Runs the actions several times in a row. Asks for how many times (5 to start with).

The first two are in every mode. The last two appear from Advanced.

Only the first time

Good for things that should happen once per level: a message when you first touch a shop, a tune when you first see the boss.

WhenHero is closer than 100 pixels to ShopOnly the first time
DoSet text of Message to “Welcome!”Show Message

Only once while this keeps happening

This fixes the most common mistake. A normal condition like “score is at least 100” is true on every tick after that. Its actions would run sixty times a second. Add this gate and they run once, and again only after the condition has gone false and come back true.

WhenScore is ≥ 100Only once while this keeps happening
DoAdd 1 to livesPlay sound Power up

Not more than once every…

A cool-down. Perfect for shooting. The player can hold Space, but a laser comes out only every half a second.

WhenWhile Space bar is pressedNot more than once every 0.5 seconds
DoShip shoots Laser at speed 80

Repeat the actions…

Runs the actions that many times in one tick. Make five coins at once, or spread a burst of sparks.

WhenUpon pressing CRepeat 5 times
DoCreate Coin at (Random(600), 0)

Because a formula runs again each time, Random(600) gives a different place for each coin.

How to add one

  1. Make the rule with its normal condition first.
  2. Click + and… at the end of the row.
  3. Click ⚙ Special, then the gate you want. Fill in seconds or times if it asks, and press Add.

Still stuck?

Try the Chocobreak tutorial, open a sample game and read its rules, or look at the questions people ask.