{"name":"BIS_fnc_unitPlaySimple","title":"BIS fnc unitPlaySimple","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_unitPlaySimple","revid":349494,"updated":"2023-11-08T17:09:09Z","groups":["Scenes"],"status":"ok","games":{"arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.50","arma3_since":"0.50","exec":"spawn","description":"Plays back input movement data on input unit. Simplified.","syntaxes":[{"syntax":"[unit, data, varDone, stateIngnore, debug, sleep, skipTime] spawn BIS_fnc_unitPlaySimple","params":[{"name":"unit","type":"Object","description":"unit to play movement data on","type_expr":"Object"},{"name":"data","type":"Array","description":"movement data to use","type_expr":"Array"},{"name":"varDone","type":"Array","optional":true,"default":"`[]`","description":"variable to set on specified Object once playback has finished in format:\n\n- 0: Object, Group or Namespace - target\n- 1: String - variable name","type_expr":"Array","text":"varDone: Array - (Optional, default `[]`) variable to set on specified Object once playback has finished in format:\n\n- 0: Object, Group or Namespace - target\n- 1: String - variable name"},{"name":"stateIgnore","type":"Boolean","optional":true,"default":"false","description":"whether to ignore if the Unit is dead and/or cannot move","type_expr":"Boolean","text":"stateIgnore: Boolean - (Optional, default false) whether to ignore if the Unit is dead and/or cannot move"},{"name":"debug","type":"Boolean","optional":true,"default":"false whether to give debug information on played frames per second","type_expr":"Boolean","text":"debug: Boolean - (Optional, default false whether to give debug information on played frames per second"},{"name":"sleep","type":"Number","optional":true,"default":"0","description":"time to sleep between frames. This is if you want to be recording another unit and playing back movement data on another as well. Limit is 0-1 seconds.","type_expr":"Number","text":"sleep: Number - (Optional, default 0) time to sleep between frames. This is if you want to be recording another unit and playing back movement data on another as well. Limit is 0-1 seconds."},{"name":"skipTime","type":"Number","optional":true,"default":"0","description":"amount of time to skip at the start of playback. For example if you wish to play the data from halfway instead of the start.","type_expr":"Number","text":"skipTime: Number - (Optional, default 0) amount of time to skip at the start of playback. For example if you wish to play the data from halfway instead of the start."}],"returns":{"type":"Script Handle","type_expr":"Script Handle","description":"script handle"}}],"examples":[{"code":["private _capturedData = [[0, [8208.26, 1953.13, 296.04], 67]];\n[BIS_Vehicle, _capturedData, [BIS_Object, \"DoneRecording\"], true, false, 0.2, 5] spawn BIS_fnc_unitPlaySimple;"]}],"see_also":["BIS_fnc_unitCaptureFiring","BIS_fnc_unitCaptureSimple","BIS_fnc_unitPlayFiring","BIS_fnc_unitPlay","BIS_fnc_unitCapture"]}