Jump to content
Sign in to follow this  
Roe-31stMEU-

Briefing help / task help

Recommended Posts

hey all, ok so I "thought" I was doing this correctly, but I guess I'm not because now whenever I complete an objective I'm not getting the little green light next to that objective in the list, no message popping up telling me it's complete, nothing. Here's what I have in my briefing first:

Obj1 = player createSimpleTask["task name"]; 
 Obj1 setSimpleTaskDescription["task description"]

Same thing goes for objectives 2 and 3. Now, as for the trigger setting to complete the task, here is what I have in there:

Condition: !Alive Radar
         On Act: Obj1 setTaskState "SUCCEEDED"; obj1=true; publicVariable "obj1";

So I go up to the radar and set a satchel, destroy it, and nothing, no little message saying the task was complete, no green light next to that task in the list... what am I doing wrong here?

---------- Post added at 11:32 PM ---------- Previous post was at 10:50 PM ----------

Update: After further checking into this, I now have realized that 2 of my 3 tasks are working correctly. The one I put up in the example above with the radar is the only one NOT working. I wonder if I just can't get an !Alive Radar on the Anti-Air Radar object? It's weird because the trigger would work when displaying a hint after using sachels on the anti-air radar, it just wont trigger the task as being complete.... very weird.... any ideas?

Share this post


Link to post
Share on other sites

Don't suppose you'd help a noob out and post your basic briefing code, plus how you've set up the working triggers? I know it's an ask, but I just can't seem to get my briefings working at all, and it's driving me mad!! Thanks if you do :)

Share this post


Link to post
Share on other sites

hi, you are missing a semicolon, unless this is the last line in your briefing you must have a semicolon where I have highlighted

Obj1 = player createSimpleTask["task name"];

Obj1 setSimpleTaskDescription["task description"];

And on a side note I think you should define your variables before you set them to "true" I'm not sure if this really matters but I always define them first then activated them in that order, But if it's working for you like that than I guess its fine ... just a thought I could be wrong. e.g...

Obj1 setTaskState "SUCCEEDED"; publicVariable "obj1"; obj1=true;

Share this post


Link to post
Share on other sites

Well, why the heck would you set variable "obj1" to true in the first place. Your task is already in that variable.

Share this post


Link to post
Share on other sites

@snK

that's just the way Ive always done it, maybe I learned it incorrectly but it still works, then I just use the variables in other triggers for example "(this) AND (obj1) AND (obj2);"

later in a mission.

so what your saying is we don't need to set the public variable or set it to true???

seems simpler I'll give it a shot thanks mate.

Share this post


Link to post
Share on other sites

You create a task and assign it to a variable named Obj1. That var is used to refer to the task (settaskstate etc). However, in your example you right away assign a boolean (true/false) to it, overwriting the task info.

It does work, if you do not need to refer to the task ever again.

Share this post


Link to post
Share on other sites

Well, I have added the missing ; at the end of that part in my briefing.sqf, I changed everything around so it looks like this: "Obj1 setTaskState "SUCCEEDED"; publicVariable "obj1"; obj1=true;" and everything, but for some reason the damn objective STILL will not go complete.... I have the hint in the exact same trigger detecting when the radar is dead and the hint will trigger, so I know the trigger is working...... it's just something with the objective stuff which must be messed up or something.

It is just really weird because for my other 2 objectives, the triggers are set-up the EXACT SAME WAY, I mean really, copy and past with a change to obj2 and a different condition of !alive "something else", type stuff from this first objective, they all work fine, it's just this one.

Edited by Roe[31stMEU]

Share this post


Link to post
Share on other sites

New problem.... for some reason my briefing.sqf isnt showing up in-game AT ALL. I used the one given by mikey at OFPEC here http://www.ofpec.com/forum/index.php?topic=33468.0. I edited it to what I needed and here is what I have now. Can anyone tell me why this aint working?

// since we're working with the player object here, make sure it exists

waitUntil { !isNull player }; // all hip now ;-)

waitUntil { player == player };

switch (side player) do

{

case WEST: // BLUFOR briefing goes here

{

player createDiaryRecord["Diary", ["Diary", ["Info", "<br/>Author - Roe<br/>Operation Night Sting Version 0.01<br/>"]];

player createDiaryRecord["Diary", ["Enemy Forces", "Enemy forces are expected to be in control of <marker name=Rasman'>Rasman</marker>. They also are in control of the <marker name='OPFOR AirBase'>Rasman Airbase</marker>. Expect many soldiers as well as technicals and possibly a small ammount of armor.]];

player createDiaryRecord["Diary", ["Support", "We have one Army Special Forces Fire Team as well as a Sniper/Spotter team. There are Three(3) HMMWV GPK (M2)'s available."]];

player createDiaryRecord["Diary", ["Mission", "Our mission is to first, use the Sniper/Spotter team to take out Colonel Aziz. He will be traveling by helicoptor to the <marker name=OPFOR AirBase'>Rasman Airbase</marker>. <br/>We will then need to use the Special Forces Fire Team to move into the airbase and plant satchel charges on the stolen UAV. Intel shows they are keeping it inside one of the hangers. <br/>The Takistani Army also has an anti-air radar at the airbase. We would like to take this out as well, however if the shit hits the fan, you're lives are more important.]];

player createDiaryRecord["Diary", ["Situation", "The Takistani Army has shot down one of our UAV's we had in the area. The UAV was not destroyed and the enemy has captured it and has it at the <marker name=OPFOR AirBase'>Rasman Airbase</marker>. Colonel Aziz of the Takistani Army is inbound to that location now to gather any intel he can and forward that on to his supperiors. <br/>They also have a Russian scientist working now to try and reverse engineer the UAV. We need to take out the Colonel, destroy the UAV, and if possible, take out an anti-air radar at the airbase as well. Good Luck men!]];

// Optional Objective

task3 = player createSimpleTask["Optional: Destroy Anti-Air Radar"];

task3 setSimpleTaskDescription["Army Special Forces Fire Team: Your optional task here is to plant satchel charges on the anti-air radar at the Rasman Airbase. <br/>Remember, this is optional, if the shit hits the fan, just get out of there!", Optional - Destroy Anti-Air Radar"];

//>---------------------------------------------------------<

// Secondary Objective

task2 = player createSimpleTask["Secondary: Destroy Captured UAV"];

task2 setSimpleTaskDescription["Army Special Forces Fire Team: You are tasked with planting satchel charges at the UAV located in one of the hangers at the Rasman Airbase.", "Destroy Stolen UAV"];

//>---------------------------------------------------------<

// Primary Objective

task1 = player createSimpleTask["Primary: Take Out Colonel Aziz"];

task1 setSimpleTaskDescription["Sniper/Spotter Team: You are assigned to assasinate Colonel Aziz. He will be arriving by Mi-24D helicoptor at the Rasman Airbase. <br/>Once completed, provide cover fire for the Army Special Forces Fire Team.", "Take Out Colonel Aziz"];

player setCurrentTask task1;

};

case EAST: // REDFOR briefing goes here

{

};

case RESISTANCE: // RESISTANCE/INDEPENDENT briefing goes here

{

};

case CIVILIAN: // CIVILIAN briefing goes here

{

};

};

If anyone can tell me WHY this isnt loading any information AT ALL, i'd greatly appreciate it. Also still not sure why the one objective wont go complete either, but I may just remove it completely.

Also, in my init.sqf I do have " [] execVM "briefing.sqf"; " in there so yes, I have that.... I believe it is correct but if not plz correct me.

Edited by Roe[31stMEU]

Share this post


Link to post
Share on other sites

3rd task's title text is missing a quotation mark:

Optional - Destroy Anti-Air Radar"];

You really should start the game with -showscripterrors. You'd instantly catch typos.

Share this post


Link to post
Share on other sites

So I have to place a " before the word Optional? Also thanks for the tip on the command line thing, I never even knew that existed, should be a HUGE help.

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  

×