{"name":"BIS_fnc_unitPlay","title":"BIS fnc unitPlay","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_unitPlay","revid":349483,"updated":"2023-11-08T17:09:03Z","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.","syntaxes":[{"syntax":"[unit, data, varDone, stateIgnore, obsolete_1, obsolete_2, skipTime] spawn BIS_fnc_unitPlay","params":[{"name":"unit","type":"Object","description":"unit to play movement data on","type_expr":"Object"},{"name":"data","type":"Array","description":"movement data recorder by BIS_fnc_unitCapture","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 - Target object\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 - Target object\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":"obsolete_1","type":"Nothing","description":"obsolete param, preserved because of backward compatibility","type_expr":"Nothing"},{"name":"obsolete_2","type":"Nothing","description":"obsolete param, preserved because of backward compatibility","type_expr":"Nothing"},{"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":"Boolean","type_expr":"Boolean","description":"always true"}}],"examples":[{"code":["[vehicle player, _unitCaptureData] spawn BIS_fnc_unitPlay"]}],"see_also":["BIS_fnc_unitCaptureFiring","BIS_fnc_unitCaptureSimple","BIS_fnc_unitPlaySimple","BIS_fnc_unitPlayFiring","BIS_fnc_unitCapture"]}