Jump to content

Recommended Posts

TBAR_fnc_createSimpleTask = {
_tskHandle = _this select 0;
_tskName = _this select 1;
_tskDescription = _this select 2;
_tskTitle = _this select 3;
_tskWaypointDescription = _this select 4;
_tskWaypointDestination = if (count _this > 5) then {_this select 5;} else {};
_tskState = _this select 6;
_setCurrentTask = _this select 7;
_tskHintMessage = _this select 8;
_tskHintState = _this select 9;

_tskHandle = player createSimpleTask [_tskName];
_tskHandle setSimpleTaskDescription [_tskDescription, _tskTitle, _tskWaypointDescription];
_tskHandle setSimpleTaskDestination (getMarkerPos _tskWaypointDestination);
_tskHandle setTaskState _tskState;
if (_setCurrentTask) then {_tskHandle setCurrentTask _tskHandle;};
taskHint [_tskHintMessage, [1, 1, 1, 1], _tskHintState];

I call the above function like this:

[tsk0, "tsk0", "Select weapons and ammunition from the 'Units' ---> 'Gear' menu.", "Rearm", "Rearm", "", "CREATED", false, "New task available! Press J to view it.", "taskNew"] call TBAR_fnc_createSimpleTask;

TBAR_fnc_setTaskState = {
_tskHandle = _this select 0;
_tskState = _this select 1;

_tskHandle setTaskState _tskState;

I call the above function like this:

[tsk0, "SUCCEEDED"] call TBAR_fnc_setTaskState;

I can't get "TBAR_fnc_setTaskState" to work no matter what I try, tasks always return "any" for some reason. Please help! :)

Dirty Haz

Share this post

Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now
Sign in to follow this