Controller Component which allows you to record and replay player inputs.
See [[classUInputReplayComponent|UInputReplayComponent]]
Recorded data is written to a binary file. It can be loaded and played back on an NPC or yourself*
Resulting .input
files are written to %LocalAppData%\Chivalry 2\Saved\InputReplay\*.input
The filename can be specified by user.
This component offers other functions, for example stitching input replays together.
What is recorded¶
- Mouse movement
- WASD movement
- All attacks
- Crouch
- Battlecry
What isn’t recorded¶
- Emotes
Caveats¶
- By default, bots are locked to a walking state. Make sure you don’t sprint while recording
- Turning on the spot is a bit tricky. You may need to exaggerate your turns
- If you try to record by calling InputRec directly on the component , only mouse movement will be recorded.
* by default, mouse movement overrides input replay on yourself
Minimal Example¶
- Use CreateInputReplayComponent to add a new component to your player controller.
- Record a
.input
file using InputRec. - Spawn an NPC using SpawnTBLAIFromClass and make it a dummy bot.
- Play the recorded file on the NPC component or on yourself.