
This commit introduces a new "delivery" task type and enhances the task assignment process for various entities. The following changes were made: - Added `delivery` and `deliveryModule` to `XEH_PREP.hpp` for pre-processing. - Added `GVAR(allCargo)` to `XEH_preInit.sqf` to track cargo objects. - Implemented `delivery` case in `fnc_handler.sqf` to handle delivery tasks. - Added `makeCargo` to `XEH_PREP.hpp` for pre-processing. - Refactored `fnc_makeShooter.sqf`, `fnc_makeObject.sqf`, `fnc_makeTarget.sqf`, `fnc_makeHVT.sqf`, `fnc_makeHostage.sqf`, and `fnc_makeIED.sqf` to: - Update descriptions to reflect assignment rather than registration. - Add error handling for null entities and missing task IDs. - Add diag_log messages for debugging. - Standardize parameter handling.
28 lines
698 B
Plaintext
28 lines
698 B
Plaintext
#include "..\script_component.hpp"
|
|
|
|
/*
|
|
* Author: IDSolutions
|
|
* Assigns an AI unit to a task as a shooter
|
|
*
|
|
* Arguments:
|
|
* 0: The AI unit <OBJECT>
|
|
* 1: ID of the task <STRING>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [this, "task_name"] spawn forge_client_task_fnc_makeShooter;
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
|
|
params [["_entity", objNull, [objNull, grpNull]], ["_taskID", "", [""]]];
|
|
|
|
if (isNull _entity) exitWith { diag_log "ERROR: Attempt to create entity from null object"; };
|
|
if (_taskID == "") exitWith { diag_log "ERROR: No task ID provided for entity"; };
|
|
|
|
diag_log format ["[FORGE] Make Shooter: %1", _this];
|
|
|
|
SETVAR(_entity,assignedTask,_taskID);
|
|
GVAR(allShooters) pushBackUnique _entity; |