Jump to content
Sign in to follow this  
JohnKalo

Invisible tasks

Recommended Posts

I know that this should be something very simple but after days of continuous searching I haven't managed to work things out.

My issue:

I have taken custom missions and I have tried to alter them so as to learn basic scripting. I have placed triggers which seem to be working. I mean apart from them not appearing in the briefing, when the conditions are met the preassigned message pops out. And that is just it.:confused:

My question:

How on earth can I make the new tasks appear in the briefing?

This is very frustrating so if anyone can help me, please do...

Share this post


Link to post
Share on other sites

I'm a bit confused but this should cover your bases...

1. for a simple new objective in the editor, put this in the on activation of a trigger

tskarea1 = player createSimpleTask["Kill Enemy"];  
tskarea1 setSimpleTaskDescription["Kill Enemy", "Kill Enemy", "Kill Enemy"l];  
tskarea1 setSimpleTaskDestination (getMarkerPos "enemy");   
player setCurrentTask tskarea1;

maybe you will need a trigger of opfor/blufor not present for enemy so that task can be completed. put in the trigger for dead enemies. this will set the objective completed and 'greened' in your tasks.

tskarea1 setTaskState "SUCCEEDED";enemyobj=true;publicvariable "enemyobj";

2. if you just need the new task to be set active then you just need to put maybe in a trigger that will activate when necessary (i.e. on completion of another task)

player setCurrentTask tskarea1;

3. or if you mean a full briefing...

first go to your mission folder i.e. my docs/arma2/missions/whateveryoumissioniscalled

then create an init.sqf in notepad and copy

execVM "briefing.sqf";

then in notepad create a briefing.sqf and copy

player createDiaryRecord ["Diary", ["Execution", "Marines will assault town"]];

player createDiaryRecord ["Diary", ["Resolution", "HQ has decided there will be an assault on the heavily defended town. Take it at all costs."]];

player createDiaryRecord ["Diary", ["Situation", "Town  must be cleared of enemy forces. "]];

tskarea2 = player createSimpleTask["Escape"];
tskarea2 setSimpleTaskDescription["Escape", "Escape", "Escape"];
tskarea2 setSimpleTaskDestination (getMarkerPos "Escape");

tskarea1 = player createSimpleTask["Kill Enemy"];  
tskarea1 setSimpleTaskDescription["Kill Enemy", "Kill Enemy", "Kill Enemy"l];  
tskarea1 setSimpleTaskDestination (getMarkerPos "enemy");   
player setCurrentTask tskarea1;

edit to how you like but formatting needs to be the same

Edited by ForzaJuve

Share this post


Link to post
Share on other sites

Many thanks for the prompt and detailed reply.

Now maybe I wasn't so clear. My problem is that when you start the mission and it has the mission briefing (map, notes, tasks) I can by no means see the tasks that I have created in the task section.

I have created a trigger which checks if OPFOR is present in a specific area.

If not the mission reports "The base is clear" as prearranged.

And the tasks marker is set from red to green.

All of this with the right scripting.

So 1 and 2 should be ok.

I have placed in the briefing:

                tskObj3 = player createSimpleTask["Primary: Clear the Base"]; 
	tskObj3 setSimpleTaskDescription["Attack the enemy OPFOR in the area.", "Clear the Base", "Clear the base"];			
	tskObj3 setTaskState 'Assigned';

But nothing seems to happen. So is this wrong? Which script do I need exactly? Yours with the tskarea?

Edited by Helicopterenthusiast

Share this post


Link to post
Share on other sites

did you create the init.sqf?

try removing the ':' from primary: usually doesn't like such things

---------- Post added at 11:50 AM ---------- Previous post was at 11:49 AM ----------

also put for the last line

player setCurrentTask tskobj3; 

instead of what you have there. might not make a difference but have to be sure it's not that

Share this post


Link to post
Share on other sites

I have finally made it!!!!

With your advise and some other help I was able to make the tasks visible and workable. Here is the script that I have used:

tskObj3 = player createSimpleTask["Primary: Empty Village"]; 
tskObj3 setSimpleTaskDescription["You clear the village  where <marker name='obj3'>enemies</marker> are located. ", "Clear village", "Clear village"];	
tskObj3 setSimpleTaskDestination (getMarkerPos 'obj3');
tskObj3 setTaskState 'Assigned';

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  

×