wait_for_events
Poll Unreal Engine repeatedly until matching events arrive or timeout expires, enabling the game thread to stay responsive between polls.
Instructions
Bridge-side composition of poll_events: repeatedly polls UE every poll_interval_ms until matching events arrive or timeout_ms expires. Implemented in the bridge (not as a UE handler) so the wait runs in this Python process -- UE's game thread keeps running between polls and game-thread events (actor_spawned, map_changed, etc.) actually fire during the wait. Same response shape and cursor semantics as poll_events, plus a 'timed_out' field. Default timeout 500ms; hard cap 30000ms (30s).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| timeout_ms | No | Maximum time to wait in milliseconds. Default 500; hard cap 30000 (over-cap requests are clamped, not rejected). | |
| poll_interval_ms | No | Bridge-side polling cadence in milliseconds. Default 100; min 25; max 1000. Lower values reduce latency at the cost of more frequent UE round-trips. | |
| since_seq | No | Same as poll_events: events with seq >= since_seq are returned. Default -1 (from oldest buffered). | |
| max_count | No | Cap returned events. Default 100; hard max 1000. | |
| event_filter | No | Substring-match filters on event type names; OR-combined. |