game_pad
Simulate gamepad button presses and stick movements in a running Unreal Engine 5 game for a set duration, with options to hold input or retrieve exact game state for observation.
Instructions
Press pad buttons and push sticks for duration seconds, then observe.
buttons: any of A B X Y UP DOWN LEFT RIGHT L1 R1 L2 R2 L3 R3 SELECT START HOME TOUCHPAD (aliases: CROSS/CIRCLE/SQUARE/TRIANGLE, LB/RB/LT/RT, BACK/OPTIONS/MENU). sticks: lx/ly left stick, rx/ry right stick (camera), l2/r2 analog triggers. Range -1..1, UE convention -- ly=+1 is forward. hold: keep this input applied after the call returns, so the character keeps moving between your turns. Clear it with game_reset_input.
Example -- run forward for half a second and look at the result: game_pad(ly=1.0, duration=0.5) Example -- jump while running: game_pad(buttons=["A"], ly=1.0, duration=0.3) Example -- move and get exact positions back, not just a picture: game_pad(ly=1.0, duration=0.5, state=True)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| l2 | No | ||
| lx | No | ||
| ly | No | ||
| r2 | No | ||
| rx | No | ||
| ry | No | ||
| grid | No | ||
| hold | No | ||
| state | No | ||
| buttons | No | ||
| observe | No | ||
| show_ui | No | ||
| duration | No | ||
| max_size | No |