- Move task implementations from prototype scripts into `functions/objects` - Keep public task functions as compatibility adapters - Update docs and init wiring for the new object-based layout
22 lines
711 B
Plaintext
22 lines
711 B
Plaintext
#include "..\script_component.hpp"
|
|
|
|
/*
|
|
* Assigns an AI unit to a task as a shooter.
|
|
*
|
|
* Public compatibility adapter around ShooterEntityController.
|
|
*/
|
|
|
|
params [["_entity", objNull, [objNull, grpNull]], ["_taskID", "", [""]]];
|
|
|
|
if (isNull _entity) exitWith { ["ERROR", "Attempt to create entity from null object"] call EFUNC(common,log); false };
|
|
if (_taskID isEqualTo "") exitWith { ["ERROR", "No task ID provided for entity"] call EFUNC(common,log); false };
|
|
|
|
["INFO", format ["Make Shooter: %1", _this]] call EFUNC(common,log);
|
|
|
|
private _controller = createHashMapObject [
|
|
GVAR(ShooterEntityController),
|
|
[_taskID, _entity, createHashMap]
|
|
];
|
|
|
|
_controller call ["registerTaskEntity", ["shooters"]]
|