Skip to content

Commit

Permalink
Fix typo (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
veggiecan0419 committed Mar 5, 2024
1 parent a79baaa commit a0bc7d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/development/extensions/hats.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Note that this is not quite the same. The forever block will run many, many time

The important difference is that `when` actually has code. After you do startHats, the block's inputs and arguments will be evaluated and passed to the block. The block can either return `true` to let the script run or `false` to prevent it from running. The block can also return a Promise that resolves to either `true` or `false` if necessary.

One tricky thing here is that Scratch won't automatically start predicate-based hat blocks -- you need to do so yourself. In this example we use the `BEFORE_EXECUTE` event (It runs, as the name implies, before any scripts get run, so anything you start here will be run during that frame). As with event blocks, you can run your predicat-based hat blocks from anywhere that you get a callback.
One tricky thing here is that Scratch won't automatically start predicate-based hat blocks -- you need to do so yourself. In this example we use the `BEFORE_EXECUTE` event (It runs, as the name implies, before any scripts get run, so anything you start here will be run during that frame). As with event blocks, you can run your predicate-based hat blocks from anywhere that you get a callback.

## Edge-activated hat blocks

Expand Down

0 comments on commit a0bc7d6

Please sign in to comment.