Jump to content

Recommended Posts

add a hint message

tskObj1 setTaskComplete "SUCCEEDED"; hint "You've completed obj1!";

Use that for now, I just found the taskHint command which might be better, but the documentation on the comref is faulty, so it will take some time to figure it out.

Jeez thanks Mike84, I appreciate all your help. I'm a little embarrassed it was so easy to do.

Share this post


Link to post
Share on other sites

How to make task hints

taskHint is relatively useless itself (because it requires too much effort), but there is a script that makes it easier to use. So instead of executing a hint, do this:

[objNull, ObjNull, tskExample1, "SUCCEEDED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";

The first 2 arguments are useless so i just send objNull, the 3rd is the task that you've created, and the 4th is the status.

Supported task states:

"CREATED"

statuscreated.png

"CURRENT"

statuscurrent.png

"CANCELED"

statuscanceled.png

"SUCCEEDED"

taskstatus.png

"FAILED"

statusfailed.png

NB,

- This command does not set the state of the task, so you still need to do this command, and the setTaskState command in your trigger.

- It creates the hint in the middle of the screen, not at the right side (this means that taskHint and hint can be used at the same time)

Edited by Mike84

Share this post


Link to post
Share on other sites
And a possible bug Jezuro, "ASSIGNED" is a valid taskState as well, but it will only cause confusion if players set their own tasks active, or when mission makers use setCurrentTask.

That's why I didn't mention that in the first place isn't it? ;)

Share this post


Link to post
Share on other sites
That's why I didn't mention that in the first place isn't it? ;)

true, but i'm 100% sure someone is going to use it, and gonna confuse the shit out of people. But I guess it can't be removed, so let's keep it on the DL then :rolleyes:

Share this post


Link to post
Share on other sites

Thank you for this information useful, I have some questions regarding the formatting of text.

Can we, as in the briefing html, change of font, have the text of different colors or simply have a newline?

(Sorry for my bad english)

Share this post


Link to post
Share on other sites

You can do newlines with <br/>

Changing of font type or colour has never been supported in ofp/arma1 i think, so I doubt it's possible in arma 2

Share this post


Link to post
Share on other sites

Does anyone know how to create the clickable links in the briefing now?

For example: in the briefing it says "Take the town of Stary Sobor" and the Stary Sobor part is clickable and centers on the correct map location. Cheers.

Share this post


Link to post
Share on other sites
For example: in the briefing it says "Take the town of Stary Sobor" and the Stary Sobor part is clickable and centers on the correct map location. Cheers.

Create an empty marker called obj1, and put it on Stary Sobor, and put this in your briefing:

<marker name='obj1'>Objective 1</marker>

Share this post


Link to post
Share on other sites

kk, i have an init.sqf saying

execVM "briefing.sqf"

and a briefing.sqf saying:

player createDiaryRecord["Diary", ["Situation", "Destroy the enemy Anti-Air Radar"]];

tskobj1 = player createSimpleTask["Insertion"];

tskobj1 setSimpleTaskDescription["Insertion by boat"];

tskobj1 setSimpleTaskDestination (getMarkerPos "obj1");

tskobj2 = player createSimpleTask["Destroy Anti-Air Radar"];

tskobj2 setSimpleTaskDescription["Destroy the Anti-Air Radar"];

tskobj2 setSimpleTaskDestination (getMarkerPos "obj2");

tskobj3 = player createSimpleTask["Extraction"];

tskobj3 setSimpleTaskDescription["Get to the LZ for chopper extraction"];

tskobj3 setSimpleTaskDestination (getMarkerPos "obj3");

tskobj4 = player createSimpleTask["Get back to the carrier"];

tskobj4 setSimpleTaskDescription["Get back to the carrier"];

tskobj4 setSimpleTaskDestination (getMarkerPos "obj4");

Nothing shows up anywhere, this is my first time creating a briefing, haven't even tried in Arma1. So yea, probably some stupid mistake, but i have read and reread this thread 3 times now and can't seem to find the problem?

Sorry for bothering.

Share this post


Link to post
Share on other sites

Well, you're using "setSimpleTaskDescription" wrong. You only give the array you're passing 1 element, while the howto says to give 3.

For the tasks not showing up, I have no clue. I copied over the code and it worked fine, bar the task descriptions of course.

Anyhow, check your rpt file for errors, because there is something else wrong here.

Edited by Mike84

Share this post


Link to post
Share on other sites

Uhm what would be the easiest way to get the new briefing to work for respawns/JIPs? My briefing files are in a briefing.sqf which will get executed by the init.sqf.

I tested my mission and the objectives work so far, but everything won't show up after respawn.

Why couldn't they just keep the old briefing... everything was fine and easier to use :( .

Edited by Icewindo

Share this post


Link to post
Share on other sites
Uhm what would be the easiest way to get the new briefing to work for respawns/JIPs? My briefing files are in a briefing.sqf which will get executed by the init.sqf.

I tested my mission and the objectives work so far, but everything won't show up after respawn.

Why couldn't they just keep the old briefing... everything was fine and easier to use :( .

Yeah, I have this problem aswell.. Sollution?

Share this post


Link to post
Share on other sites
Yeah, I have this problem aswell.. Sollution?

Solution:

Write this in the init from all your playable units:

this addEventHandler ["killed", {_this execVM "respawn_player.sqf";}];

respawn_player.sqf:

sleep playerRespawnTime;
player exec "briefing.sqs";

But if you want that this works, you must create your Briefing in a seperate file :) And I don't know if a task is marked as succeeded when it's done but the player spawns again.

Share this post


Link to post
Share on other sites

Some more information:

Still unable to get tasks to be updated for new players and still removing TASKS for respawned players.

Also, the hint doesnt show...

Trigger Cond:

isServer & No Opfor

OnAct:

setmarkercolor green; vybordown = 1; publicVariable vybordown; hint "Vybor Done";

Briefing.sqf:

private ["_diary"];

_diary = player createDiaryRecord["Diary", ["Briefing", "Still testing this out. Most vehicles locked until future versions!"]];

town1 = player createSimpleTask ["obj1"];
town1 setSimpleTaskDescription ["Clear each of the towns marked on the map.","Clear Vybor.","Clear Vybor."];
town1	setSimpleTaskDestination (getMarkerPos "obj1");
if (isNil "vybordown") then {
	town1 settaskstate "Created";
} else {
	town1 settaskstate "Succeeded";
	"obj1" setMarkerColor "ColorGreen"; 
};

Share this post


Link to post
Share on other sites

Try this for your Trigger:

Cond: !(alive player)

Deact: setmarkercolor green; vybordown = 1; publicVariable vybordown; hint "Vybor Done";

Share this post


Link to post
Share on other sites

Could someone perhaps make a briefing example file?

One where you only have to change stuff to fit your own mission?

That would be greatly appreciated, cause i don't know where to get this .sqf file or something... I was used to the html thing, but this is just confusing:confused:

Share this post


Link to post
Share on other sites
Try this for your Trigger:

Cond: !(alive player)

Deact: setmarkercolor green; vybordown = 1; publicVariable vybordown; hint "Vybor Done";

But then the mission would only show done if you die lol.

Share this post


Link to post
Share on other sites

I now have this partly working.

I just setup a loop for when the player is alive again, to re-trigger the briefing.sqf.

However, tasks do not show UNLESS I click on "PLAYERS" on the map section, then the TASKS show up. Strange behaviour.

This is fixed in Aircav by Xeno, but I cannot find how they are automatically shown again after a few seconds from respawn.

Share this post


Link to post
Share on other sites
Could someone perhaps make a briefing example file?

One where you only have to change stuff to fit your own mission?

That would be greatly appreciated, cause i don't know where to get this .sqf file or something... I was used to the html thing, but this is just confusing:confused:

I support this request... I'm stuck at my the briefing now (everything else is finished).

Share this post


Link to post
Share on other sites
How to make task hints

[objNull, ObjNull, tskExample1, "SUCCEEDED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";

how do i get this taskHint.sqf ?

if i use this code in the activation field of the trigger, the editor returns an error: "Typ Script, expect nothing"

Share this post


Link to post
Share on other sites
How to make task hints

[objNull, ObjNull, tskExample1, "SUCCEEDED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";

how do i get this taskHint.sqf ?

if i use this code in the activation field of the trigger, the editor returns an error: "Typ Script, expect nothing"

Use:

nul = [objNull, ObjNull, tskExample1, "SUCCEEDED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";

because the editor always wants to save the script handle (i still dont get why, but whenever you get that error, just put "nul = " in front of it).

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

×