Comrades in Arms Discussion Board

Full Version: FHQ Task Tracker (Obsolete)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6
(05-24-2013, 10:19 AM)Lightspeed link Wrote: [ -> ]How do I create a new marker and put it in a certain position when I add a new task using this script?

I don't know what you mean. The script will not create markers (only task markers when a position is given). To create a new marker, you need to first create it via createMarker

You also don't need a marker per se, since you normally just pass a position anyway...
Ok so adding a task after completion of one task, if there is no marker I need to create it and set its position on the map.
sorted!  Wink
OK having a slight problem.

Solo - Briefing shows up
Computer hosted with more than 1 - Briefing shows up
Ded server solo - Briefing shows up
Ded server multiple - Briefing doesn't show  up until "on the ground"

Strange thing is that when inside of the mission everything works fine but it is just the first task that I want everyone to see before the start of the mission doesn't show up.

This also happened with notes.

rpt doesnt give me any errors which makes me glad and mad at the same time.


Oddities.  My newer missions notes were visible before leaving briefing. My older missions notes were not. I copy pasta'd and simply edited them.

I just dont see anything wrong with fhqtt. :'(

init
Code:
call compile preProcessFileLineNumbers "fhqtt.sqf";
execVM "briefing.sqf";

private ["_a","_b"];

GL4_Path = "GL4_System\";

[] spawn
{
    waitUntil { !(isNil "GL4_Core") };
    call compile preProcessFile "GL4_Settings\GL4_Core.sqf";

    waitUntil { !(isNil "GL4_Global") };
    call compile preProcessFile "GL4_Settings\GL4_Global.sqf";

    waitUntil { !(isNil "GL4_Local") };
    call compile preProcessFile "GL4_Settings\GL4_Local.sqf";
};

if (isServer) then
{
    _a = allUnits;

    {if ( { (isPlayer _x) } count (units _x) > 0) exitWith {_b = (vehicle _x) } } forEach _a;

    [_b] execVM (GL4_Path+"GL4_System.sqf");
}
else
{
    waitUntil { (player == player) };

    if (player == player) then
    {
        _a = allUnits;

        {if ( { (isPlayer _x) } count (units _x) > 0) exitWith {_b = (vehicle _x) } } forEach _a;

        [_b] execVM (GL4_Path+"GL4_System.sqf");
    };
};

[0.4, 1, 0.5, [-1, -1]] execVM "Scripts\DynamicWeatherEffects.sqf";


_light1 = "#lightpoint" createVehicleLocal (getMarkerPos "houselight1");
_light1 setpos[(getmarkerpos "houselight1" select 0), (getmarkerpos "houselight1" select 1),((getmarkerpos "houselight1" select 2) + 2.2)];
_light1 setLightColor [1,1,1];
_light1 setLightAmbient [1,0.5,1];
_light1 setLightBrightness 0.02;

////////////////////////CIVI LIMIT////////////////////////////////////
SHK_DeadCivilianCount = 0;
SHK_DeadCivilianLimit =   10;    /// paramsarray select 2;
SHK_EndMission = false;
[] spawn {
  waituntil {SHK_EndMission};
  cuttext ["Too many civilians have been killed. This operation is a failure.","PLAIN",2];
  sleep 10;
  endmission "END5";
};

SHK_fnc_deadCivilians = {
  hintsilent format ["Civilians dead: %1",_this];
  if (_this >= SHK_DeadCivilianLimit) then {
    SHK_EndMission = true;
    publicvariable "SHK_EndMission";
  };
};

SHK_eh_killed = {
  private "_side";
  _side = side (_this select 1);
  if (_side == EAST) then {
    SHK_DeadCivilianCount = SHK_DeadCivilianCount + 1;
    publicvariable "SHK_DeadCivilianCount";
    if isdedicated then {
      if (_this >= SHK_DeadCivilianLimit) then {
        SHK_EndMission = true;
        publicvariable "SHK_EndMission";
      };
    } else {
      SHK_DeadCivilianCount call SHK_fnc_deadCivilians;
    };
  };
};
if isserver then {
  {
    if (side _x == Civilian && _x iskindof "Man") then {
      _x addEventHandler ["killed", SHK_eh_killed];
    };
  } foreach allunits;
} else {
  "SHK_DeadCivilianCount" addpublicvariableeventhandler { (_this select 1) call SHK_fnc_deadCivilians };
};
[] spawn {
  waituntil {!isnil "BIS_alice_mainscope"};
  waituntil {!isnil "bis_fnc_variablespaceadd"};
  [BIS_alice_mainscope,"ALICE_civilianinit",[{_this addEventHandler ["killed", SHK_eh_killed]}]] call bis_fnc_variablespaceadd;
};
        

waitUntil{!(isNil "BIS_fnc_init")};
sleep 3;
    [rank player, name player] call BIS_fnc_infoText;
sleep 3;
    ["Purity Fallen"] call BIS_fnc_infoText;
sleep 3;        
        ["Ghat District","Libya", str(date select 2) + "." + str(date select 1) + "." + str(date select 0)] call BIS_fnc_infoText;

briefing.sqf
Code:
/* Briefing
* The briefing can be defined by calling FHQ_TT_addBriefing.
* The array is built like this.
* The first element should be a filter (side, group, faction, or a piece of script). All units matching the
* filter will see the briefing
* This is followed by pairs of strings, a head line, and an actual text.
* Briefings are added in the order in which they appear for any unit that matches
* the last filter.
*/
[
    East,
        ["Situation",
            "Mostly calm, mostly..."],
            
        ["Mission",
            "Special operations teams have confirmed  the presence of one Youssouf Imiogot in the area of Daraz Gerg. UAV flyovers have confirmed his presence to be in one of the southern buildings. Youssouf Imiogot is one of the primary leaders of the Chadian rebels, removing him will effectively remove the rebels from this area."],
            
        ["Background",
            "Russian support has increased the stability of the area, though the 23rd is having an extreme resistance to the west in the Aliabad region. There are rumours that once this area is secured the 18th will be tasked with reinforcing the 23rd."],            
            
        ["Hostile forces",
            "Chadian gangsters, Libyan vigilantes, and militia-men."],
            
        ["ROE + Call Signs",
            "Civilian casualties are HEAVILY DISCOURAGED and can cause abandonment of mission. Infantry team = Purity  Mi-24 Pilots= Krok  HQ= Hammer FOB= Sickle HVT= Nail."],

        ["Allied forces and Support",
            "1 UAV is available for recon duties at the Operational HQ. 1 Ammo and repair truck are available at FOB Sickle."],
            
        ["Weather",
            "Sandstorm expected to fully engulf the area within the hour. Use flares to enhance visibility.  Average 17km/h wind to NE but that changes wildly."],
            
        ["Credits",
            "Mission by Viktor Reznov. Many thanks to the chaps at CiAHome.net and the chaps from bis forums. Version 1.0"]
   
] call FHQ_TT_addBriefing;

[
    East,                                                           // Filter
        ["task1",                                        // Task name
         "Vodnik is located outside of FOB Sickle.",                Â       // Task text in briefing
         "Board Vodnik",                            // Task title in briefing
         "",                                            // Waypoint text
         getmarkerpos "nick"                                            // Optional: Position or object
                                                        // Optional: Initial state
        ]
] call FHQ_TT_addTasks;
You're running the briefing with execVM. Now, ececVM generates an interruptable context, which might (as the name implies) get interrupted for some reason (sleep is the most common one). Try to replace this with

call compile preprocessFileLineNumbers "briefing.sqf";

and see if that fixes your problem.
Just a headsup to anyone who may be reading! That fix has worked. Thanks for the assistance.

That being said Phantom if you read this, perhaps make a note about that in on your site?
http://s9.postimg.org/5c27e4qmn/screenshot_21.png

Big Grin

Im unsure if that changes anything as I dont know what is supposed to be in there but just a headsup!
Looks like I got to change the execVm briefing.sqf to call as well in the init. Has my missions have any briefing problems so far so I know what to fix? I guess I'll use call for briefings in the future.
I would use "call compile preprocessFileLineNumbers" generally during init.sqf. I think the problem is that call is sequential, while execVM spawns a thread (i.e. a parallel executing script".
I was wondering: does this script use the ArmA3 style taskhint for ArmA3?
From what I remember before, I think it does.
I tried it, it doesn't. Is there a newer version?

Also, will there be commands to update and remove tasks? Right now you can only update the states, not destinations or descriptions.
(10-05-2013, 09:42 AM)Outlawz7 link Wrote: [ -> ]I tried it, it doesn't. Is there a newer version?

Yes, there's a newer version that uses the new Arma 3 hints. I attached it, hope Varanon doesn't mind.

EDIT: Also, you need to remove the recompilation of the custom notification function from init.sqf.
(10-05-2013, 04:12 PM)Alwarren link Wrote: [ -> ]Also, you need to remove the recompilation of the custom notification function from init.sqf.

???

Uh, how?
(10-05-2013, 09:00 PM)Outlawz7 link Wrote: [ -> ]???

Uh, how?

There is likely a line

call compile preProcessFileLineNumbers "library\newTaskHintInit.sqf";

in init.sqf. That should be removed. Internally, the task tracker calls FHQ_TT_taskHint to show the hint. The newTaskIntInit overrides that with the slide-out we usually use for Arma 2, but in Arma 3 you will want to keep fhqtt.sqf's default.
Pages: 1 2 3 4 5 6