Workshop › Pac-Man-style Maze Chase › Step 25 of 42
In scatter mode a ghost's target is its own corner. Because the corners are outside the maze, a ghost never arrives: it keeps circling the block nearest to its corner until chase mode begins.
```js
if (mode() === 'scatter') return g.corner
```return ends target early, so the line below only runs in chase mode.At the top of target, above return player, write the scatter line.
Skills: Game states
← Scatter or chase? Pink cuts you off →