27 lines
548 B
Plaintext
27 lines
548 B
Plaintext
#include "..\script_component.hpp"
|
|
|
|
/*
|
|
* Author: Creedcoder, J. Schmidt
|
|
* Registers an AI unit as a hvt.
|
|
*
|
|
* Arguments:
|
|
* 0: The AI unit <OBJECT>
|
|
* 1: ID of the task <STRING>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [this, "task_name"] spawn forge_client_task_fnc_makeHVT;
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
|
|
params [["_entity", nil, [objNull, 0, [], sideUnknown, grpNull, ""]], ["_taskID", "", [""]]];
|
|
|
|
SETVAR(_entity,assignedTask,_taskID);
|
|
GVAR(allHVTs) pushBackUnique _entity;
|
|
|
|
if (alive _entity) then {
|
|
[_entity, "hvt"] spawn FUNC(heartBeat);
|
|
}; |