Jump to content

Recommended Posts

Hi

I have two questions regarding tasks.

 

1. What are the different meanings of a CREATED and an ASSIGNED task? A task is first CREATED. When I complete I set it to SUCCEEDED. If I fail it it will be FAILED, and if it's canceled it will be CANCELED. But what does ASSIGNED really mean? Would any of you miss it if it was not available, and why?

 

2. Why can I set a task to "current" (script command 'setCurrentTask')? All players can change it for themselves too, which makes me wonder what it can be used for. Why would a player set a task to 'current task', instead of just performing it? In what kind of scenario would it be useful?

 

(For a long time i confused the ASSIGNED state with the 'current task'. It still feels like it could be used for the same purpose).

Share this post


Link to post
Share on other sites
9 minutes ago, engima said:

But what does ASSIGNED really mean?

The player has it as their current selected task. A created task is just that its been created and is listed as available in the players task list.

 

10 minutes ago, engima said:

Why would a player set a task to 'current task', instead of just performing it?

As they may have many available tasks. The current (ASSIGNED) gives you the benefit of visual aids like destination and will be coloured orange in their task list and when viewing 3D task icons.

Share this post


Link to post
Share on other sites

In addition setting a task as current can help highlight it for the player to help guide the player on what to do next in big and complicated scenarios. 

Share this post


Link to post
Share on other sites
9 hours ago, Larrow said:

The current (ASSIGNED) gives you the benefit of visual aids like destination and will be coloured orange in their task list and when viewing 3D task icons.

Ok, thanks. Then I understand the benefits of the ASSIGNED state.

 

However, it seems like you have confused the ASSIGNED state and the 'current' flag as I did. Besides setting the state of a task to ASSIGNED you can also set a task to 'current'. Many tasks can be ASSIGNED, but only one can be current. A player cannot change the ASSIGNED state on their own, but he/she can set tasks to current. So what is the idea of current? Maybe it is simply to give player's head an extra option to keep order.

Share this post


Link to post
Share on other sites

You can script a task as current to add more dynamic to missions/tasks or objectives.

Say your team discovers something important mid-mission (think unknown hostage situation), a new task pops up and is set as current by the mission maker to underline its importance.

 

Cheers

Share this post


Link to post
Share on other sites

Current just sets the task as the current one you are following and will have its destination displayed. It will also automatically assign it for you. When the current task changes it will unassign the previous current.

 

Spoiler

h = [ ] spawn {    
		    _tsk_1 = player createSimpleTask [ "task 1" ];
		    _tsk_1 setSimpleTaskDescription [ "task 1", "task 1", "task 1" ];
		    _tsk_1 setSimpleTaskDestination ( player getPos [ 10, getDir player - 20 ] );
		    
		    _tsk_2 = player createSimpleTask [ "task 2" ];
		    _tsk_2 setSimpleTaskDescription [ "task 2", "task 2", "task 2" ];
		    _tsk_2 setSimpleTaskDestination ( player getPos [ 10, getDir player + 20 ] );
		    
		    systemChat "Created two tasks";
		    
		    {
		        systemChat format[ "%1 is %2", ( taskDescription _x ) select 0, taskState _x ];
		    }forEach [ _tsk_1, _tsk_2 ];
		    
		    uiSleep 10;    
		    systemChat "setting task 2 to Assigned";
		    _tsk_2 setTaskState "ASSIGNED";
		        
		    {
		        systemChat format[ "%1 is %2", ( taskDescription _x ) select 0, taskState _x ];
		    }forEach [ _tsk_1, _tsk_2 ];
		    
		    uiSleep 10;
		    systemChat "setting task 1 to Current";
		    player setCurrentTask _tsk_1;
		    
		    {
		        systemChat format[ "%1 is %2", ( taskDescription _x ) select 0, taskState _x ];
		    }forEach [ _tsk_1, _tsk_2 ];
		        
		    uiSleep 10;    
		    systemChat "setting task 2 to Current";
		    player setCurrentTask _tsk_2;
		    
		    {
		        systemChat format[ "%1 is %2", ( taskDescription _x ) select 0, taskState _x ];
		    }forEach [ _tsk_1, _tsk_2 ];
		        
		    uiSleep 10;    
		    systemChat "setting task 1 to Current";
		    player setCurrentTask _tsk_1;
		    
		    {
		        systemChat format[ "%1 is %2", ( taskDescription _x ) select 0, taskState _x ];
		    }forEach [ _tsk_1, _tsk_2 ];
		};

Do it once from whilst looking at the task list and then again whilst watching you 3D task icons.

Notice when task 1 is set to current task 2 still stays assigned, task 1 will show its 3D icon.

When task 2 is set to current task 1 is unassigned, task 2 will show its 3D icon.

When task 1 is re set as current task 2 is unassigned, task 1 will show its 3D icon.

 

 

Share this post


Link to post
Share on other sites

Ok, thanks! I got what I need for now. Engima's Simple Tasks 2.0 coming soon...

Share this post


Link to post
Share on other sites

Thanks Larrow for your contribution!

 

There is still one thing I get confused about, but I wonder if that might be an Arma bug:

 

When i set a task as 'current task' in script, it gets yellow in the task list for the player. If the player then clicks 'Unassign' then first nothing happens. If I then click 'Unassign' again, the task gets unassigned and the 'Unassign' option turns to 'Assaign'. Why do I need to click twice to unassign it in this case?

 

Cheers!

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

×