Jump to content
Sign in to follow this  
xALIENAx

Where Am I going wrong with my Breifing/Objectives

Recommended Posts

Im somewhat new to making actual mission (normally just write scripts for other's projects) And I've tried to my best to get this working.

My Breifing File:

soldier1 createDiaryRecord ["Diary", ["Mission Outline", "You Are Tasked with Destroying Enemy Fuel trucks. Our last satelite scan Showed a large group of Tanker trucks leaving the Nango processing Facility"]];
soldier1 createDiaryRecord ["Diary", ["Intel", "Recon Shows Multiple Enemy Roadblocks around Zargabad. City is well defended by AA and a Warning system"]];
soldier1 createDiaryRecord ["Diary", ["Support", "Support Is Limited for this Mission. You have a UAV drone Assigned to your command."]];


// Task 1
tskobj_1 = soldier1 createSimpleTask ["Search Nango For Fuel Trucks, Destroy Any you find!"];
tskobj_1 setSimpleTaskDescription ["Move to Nango, Search the area for Fuel trucks. Be careful to avoid enemy Patrolls<marker name=""nango"">Search Nango</marker> ", "Search Nango", "Nango"];
tskobj_1 setSimpleTaskDestination (getMarkerPos "nango");

// Task 2
tskobj_2 = soldier1 createSimpleTask ["Search Azizayt"];
tskobj_2 setSimpleTaskDescription ["Search the Azizayt Depot for Ammo Trucks. Be careful not to alert the nearby Garrison!<marker name=""azizayt"">Azizayt Depot</marker> ", "Search Azizayt", "Azizayt Depot"];
tskobj2 setSimpleTaskDestination (getMarkerPos "azizayt");

// Task 3
tskobj_3 = soldier1 createSimpleTask ["Search Zargabad"];
tskobj_3 setSimpleTaskDescription ["<marker name=""zrg"">Zargabad</marker>is well Defended and equipped with an alarm system. Be be extra Careful<br />You Should Find the Ammo trucks somewhere in the city.<br />Defenses consist of About 30 troops, Several roadblocks, and a few technicals. If they raise an alarm reinforcements will be called in!", "Search Zargabad", "Search Zargabad"];
tskobj_3 setSimpleTaskDestination (getMarkerPos "zrg");

// Task 4
tskobj_4 = soldier createSimpleTask ["flee Zargabad"];
tskobj_4 setSimpleTaskDescription ["Escape Zargabad and head to the <marker name=""extraction"">Extraction Point</marker> . Once there, use your radio menu to call in the extraction Helo. Load up, then again via the radio signal "we're ready" to be extracted!", "Flee the city", "Extraction"];
tskobj_4 setSimpleTaskDestination (getMarkerPos "Extraction");

My Objective Triggers: (on Act)

"1" objStatus "DONE"; tskobj_1 setTaskState "SUCCEEDED"; player setCurrentTask tskobj_2; obj_1 = true; publicVariable "obj_1"; HintC "No Fuel Trucks Found, Move on to the next Objective";

"2" objStatus "DONE"; tskobj_2 setTaskState "SUCCEEDED"; player setCurrentTask tskobj_3; obj_2 = true; publicVariable "obj_2"; HintC "No Fuel Trucks Found here Either, Move on to the next Objective";

"3" objStatus "DONE"; tskobj_3 setTaskState "SUCCEEDED"; player setCurrentTask tskobj_4; obj_3 = true; publicVariable "obj_3"; HintC "You Destroyed the enemy Fuel Stock Pile!! Escape Zargabad and Get to the Extraction!";

"4" objStatus "DONE"; tskobj_4 setTaskState "SUCCEEDED"; obj_4 = true; publicVariable "obj_4"; HintC "Wait For the Extraction Chopper"

Obviously I changed the Hint and tskobj_number for each successive trigger.

With the Brieifing Above I get only the first 3 Objectives (in reverse order of course. Im aware it reads from the bottom)

When i flip the script to put them in the correct order, I have no tasks in game. (task 4 is always excluded even in the order posted above.)

I have tried:

Adding a Blank Briefing.html

Coppying my brieifing ito the html

Saving (export to single mission) (deleting and re-saving the exported .pbo after each of the above)

Share this post


Link to post
Share on other sites

Task 1, 2 and 3 you assign to unit "soldier1", but you assign task 4 to unit "soldier"...?

Share this post


Link to post
Share on other sites

o_0 n00b moment. I guess i been trying for too long. Will get back to you in a few on that. it should be soldier1.

---------- Post added at 10:28 AM ---------- Previous post was at 10:14 AM ----------

Okay That's got it working, but when i reverse the Breifing.sqf to get them in the right order, Only Task 4 is availabke!?

Share this post


Link to post
Share on other sites

Ok, I've checked, and you have two errors. On line 23 you should use double qoutes (""we're ready"") instead of single ("we're ready"). And on line 14 you have entered the erronous "tskobj2" that should be "tskobj_2".

If you're not using Squint for editing (an editor that notifies you about such mistakes while editing) you can start ArmA2 with parameter "-showscripterrors" to see script errors when mission starts.

Share this post


Link to post
Share on other sites

Thanks I'll try that. I hand write most of my code with notepad. How ive been doing it since opflash :P

If it gets really big i use A2B and A2D (mainly for complex MP stuff that has to asign many different things for different players)

Share this post


Link to post
Share on other sites

That sorted it. Apparently i was too tired to notice that :P

I swear i checked the script up and down like 20 times before asking lol

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  

×