#include "..\script_component.hpp" /* * Author: IDSolutions * Assigns an object to a task as a protected target * * Arguments: * 0: The object * 1: ID of the task * * Return Value: * None * * Example: * [this, "task_name"] spawn forge_server_task_fnc_makeObject; * * Public: Yes */ params [["_entity", objNull, [objNull]], ["_taskID", "", [""]]]; if (isNull _entity) exitWith { ["ERROR", "Attempt to create entity from null object"] call EFUNC(common,log); }; if (_taskID == "") exitWith { ["ERROR", "No task ID provided for entity"] call EFUNC(common,log); }; ["INFO", format ["Make Object: %1", _this]] call EFUNC(common,log); SETPVAR(_entity,assignedTask,_taskID); GVAR(TaskStore) call ["registerTaskEntity", ["entities", _taskID, _entity]];