sys_record(STRING* name,var mode)
Records or replays the user input in a file in the savedir folder. This can be used for recording or replaying a demo.
||name of the file to be recorded or replayed, or NULL to stop recording or replaying.
0 - record only keys and mouse buttons (file size ca. 1 kb/sec).
1 - record keys and mouse movements and buttons (ca. 3 kb/sec).
3 - record keys, mouse, and joystick movements and buttons (ca. 10 kb/sec).
> 0 - operation successful, <= 0 - operation failed.
- When using sys_record() and sys_replay() during gameplay for recording a demo, execute a game_save() / game_load() instruction before for starting the demo from the same position within the level.
- [Ctrl-Alt-Esc] stops recording and replaying (development version only). Setting record_mode to 0 also stops recording and replaying.
- The command line options -rec and -rpl automatically record or replay all keyboard and mouse input from the beginning to the file tape.rec (development version only). Joystick movements and buttons are not recorded. This can be used to reproduce a certain movement sequence for debugging purposes.
- During replay, the application will still react on hitting keyboard or mouse buttons, but not on mouse or joystick movements.
- The time_step and time_frame variables are recorded and replayed also for precisely reproducing movements.
// Record a demo from the current position
game_save, game_load, savedir, record_mode ► latest version online