Wait for something to happen
wait_forBlock until a chosen robot event occurs—seen, gone, close, touch, bump, or panel—instead of polling, then return what happened with bearings, or a timeout.
Instructions
Watch the robot about 10 times a second and return the moment something happens, instead of checking over and over. Returns what happened (with bearings), or that it timed out.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| event | Yes | seen: the target comes into view. gone: it leaves the view. close: it's right in front of the robot or in the kicker. touched: someone touches the robot's screen. bump: the robot is knocked or crashes. panel: the person does something in the control panel. | |
| label | No | Instead of target: the label of an object the person named in the control panel (e.g. 'left post'), or a taught colour (e.g. 'red cup') | |
| target | No | any | |
| timeout_s | No | Give up after this many seconds |