Jump to content
Sign in to follow this  
IndeedPete

Messed up Taskhints

Recommended Posts

Hello!

So i was trying the new functions to set task states and create new tasks during a mission when i came across "funny" behaviour. Is it normal that taskhints loog like this:

2013-09-25_00001hojyu.jpg

However, my own taskhints look like this:

2013-09-25_00004p3jjw.jpg

I am creating new tasks via:

[player, "tArrest", ["Take the sleeper agent <marker name=""mArrest"">'Isaac Karadimas'</marker> into custody and bring him to <marker name=""mNormandy"">FOB Normandy</marker>!", "Arrest Isaac Karadimas", "Isaac Karadimas"], "mArrest", false, 1] call BIS_fnc_taskCreate;

And to set task states:

["tNormandy", "SUCCEEDED", false] call BIS_fnc_taskSetState;

When setting task states, i can suppress the automatic taskhint with the third parameter and call my own instead but i can't do so when creating tasks. That causes the game to show the ugly one where the task description is shown and not the title. Is there some workaround or did you even experience this behaviour? Am i doing something wrong?

---------- Post added at 02:44 PM ---------- Previous post was at 02:43 PM ----------

Oh, and my notifications.hpp (gets included in description.ext):

class CfgNotifications
{
class Default
{
	title = ""; // Tile displayed as text on black background. Filled by arguments.
	iconPicture = ""; // Small icon displayed in left part. Colored by "color", filled by arguments.
	iconText = ""; // Short text displayed over the icon. Colored by "color", filled by arguments.
	description = ""; // Brief description displayed as structured text. Colored by "color", filled by arguments.
	color[] = {1,1,1,1}; // Icon and text color
	duration = 5; // How many seconds will the notification be displayed
	priority = 0; // Priority; higher number = more important; tasks in queue are selected by priority
	difficulty[] = {}; // Required difficulty settings. All listed difficulties has to be enabled
};

class TaskCreated
{
	title = "TASK ASSIGNED";
	iconPicture = "\A3\ui_f\data\map\mapcontrol\taskIconcreated_ca.paa";
	description = "%1";
	color[] = {1,1,1,1};
	priority = 7;
};

class TaskAssigned
{
	title = "CURRENT TASK";
	iconPicture = "\A3\ui_f\data\map\mapcontrol\taskIcon_ca.paa";
	description = "%1";
	color[] = {1,1,1,1};
	priority = 7;
};

class TaskCanceled
{
	title = "TASK CANCELED";
	iconPicture = "\A3\ui_f\data\map\mapcontrol\taskIconcanceled_ca.paa";
	description = "%1";
	color[] = {0.75,0.75,0.75,1};
	priority = 7;
};

class TaskFailed
{
	title = "TASK FAILED";
	iconPicture = "\A3\ui_f\data\map\mapcontrol\taskIconfailed_ca.paa";
	description = "%1";
	color[] = {1,0.1,0,1};
	priority = 7;
};

class TaskSucceeded
{
	title = "TASK SUCCEEDED";
	iconPicture = "\A3\ui_f\data\map\mapcontrol\taskIcondone_ca.paa";
	description = "%1";
	color[] = {0.6,0.8,0.4,1};
	priority = 7;
};

};

Share this post


Link to post
Share on other sites

Either use BIS_fnc_setTask instead of BIS_fnc_taskCreate and then you can use param 6 to turn off notifications and handle them yourself. (This is all taskCreate really does is pass your info to setTask)

OR

Change your CFGNotifications so description uses %2 like the default ones do. Then they will show the title rather than the long description.

Create task basically sends your whole task array to showNotification e.g ["Take the sleeper agent <marker name="mArrest"">'Isaac Karadimas'</marker> into custody and bring him to <marker name=""mNormandy"">FOB Normandy</marker>!", "Arrest Isaac Karadimas", "Isaac Karadimas] so where you have replaced the original CFGNotification and description now = %1 they are showing the description rather than the title.

Share this post


Link to post
Share on other sites

Ah, now i understand, figured it was my mistake. You see, i am currently building a set of missions and in the first few ones i used to handle everything "oldschool" (create tasks via "createSimpleTask", use own taskhint function etc.) However, now i switched to the new function-based BIS system without adjusting my notifications. (I carried the notifications.hpp from mission to mission like i do with my identities.hpp.)

Thank you, will adjust this ASAP! :)

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  

×