G

guttersnipe

Member

Last active 6 years ago

  1. 6 years ago
    Tue Sep 5 18:15:53 2017
    G guttersnipe posted in removing custom objective via trigger.

    That's cleared up a lot for me.

    Thank you all for your time and patience.

  2. Tue Sep 5 15:05:45 2017
    G guttersnipe posted in removing custom objective via trigger.

    Made a fresh mission, stripped of everything except alive and cba. Add trigger works as before with the name of the new objective showing up for Ofcom in debug. Remove objective now fires (in as far as I can tell) without error, however I see no evidence that the objective has been removed (ie alive debug still shows it as a # X. Have waited 10 mins in mission is see the next ofcom/Taccom summary, but same number of objectives listed as prior to trigger.
    I think that the problem with the full mission with addons seems to be that although the custom objective is added after alive has initalised, it might not be being recognised as an official objective by the OPCOM in time before remove trigger fires, hence the objective can't be removed from a list which doesn't contain it yet.!
    Queries: how long does it take to add/remove - at the end of each cycle?
    Should the debug marker dissappear if the objective has been removed, or will it persist as a ghost?

    The pre-exsisting objectives, compiled as the game starts list each objective as a # number. These include the placed official civil & military objectives as well as the other custom markers. It it possible to use the remove script to destroy one of them or is the script purely for user placed custom objectives?

    (and separate issue,)
    Using the option to profile all units after startup (eg adding zeused in groups to OPCOM) - does turning on this option include editor placed units prior to initiallising the mission which were previously marked as exempt?

    Apologies for the number of questions. (and probably end user inspired misconceptions of how this all works) - I can only say I'm enjoying using the mod so much, I'm hooked.

  3. Mon Sep 4 12:44:14 2017
    G guttersnipe posted in removing custom objective via trigger.

    That's the correct objective name (it's works ok for the add objective script). Tried the same call on a brand new map/mission, same result on line17. Also tried calling it from local exec & using azeus. Can't figure it out.

  4. Mon Sep 4 06:56:28 2017
    G guttersnipe posted in removing custom objective via trigger.

    Thanks for your time & assistance.

    I used the text exactly as you provided -

    ["CustomObjectiveTatters", ["GUER"]] call cjb_RemoveObjectiveToSides;

    Cut and pasted straight into trigger activation field. Checked trigger firing normally, however getting that same error above.

    In same trigger, calling the add objective script, I'm using

    [["OFCOMMIL1", getMarkerPos "opforComRetake", 200,"MIL"],["GUER"]] call cjb_addObjectiveToSides; which calls the sister script, opcomadd.sqf from the same location, which works perfectly without a hitch.

    Both scripts are called from the init,

    nul = [] execVM "Scripts\opcomadd.sqf";
    nul = [] execVM "Scripts\opcomrem.sqf";

    The ofcomrem.sqf looks like this:

    cjb_RemoveObjectiveToSides =
    {
    private["_factions","_faction","_opcom","_opcomSide"];
    _id = _this select 0;
    _factions = _this select 1;
    {
    _opcom = _x;
    {
    _faction = _x;
    _opcomSide = [_opcom,"side",""] call ALiVE_fnc_HashGet;

    if( _opcomSide == _faction) then {
    [_opcom, "removeObjective", _id] call ALiVE_fnc_OPCOM;
    };
    } forEach _factions;
    } forEach OPCOM_INSTANCES;
    };

  5. Sun Sep 3 20:10:34 2017
    G guttersnipe posted in removing custom objective via trigger.

    Still can't get this working, getting the same error:-

    21:03:23 Error in expression <ctive", _id] call ALiVE_fnc_OPCOM;
    };
    } forEach _factions;
    } forEach OPCOM_INSTA>
    21:03:23 Error position: <forEach _factions;
    } forEach OPCOM_INSTA>
    21:03:23 Error foreach: Type String, expected Array
    21:03:23 File C:\Users\Pete\Documents\Arma 3 - Other Profiles\Pistol%20Pete\mpmissions\Checkpoint%20Sandybottom.Takistan\Scripts\opcomrem.sqf, line 17
    21:03:23 Error in expression <ctive", _id] call ALiVE_fnc_OPCOM;
    };
    } forEach _factions;
    } forEach OPCOM_INSTA>
    21:03:23 Error position: <forEach _factions;
    } forEach OPCOM_INSTA>
    21:03:23 Error Generic error in expression
    21:03:23 File C:\Users\Pete\Documents\Arma 3 - Other Profiles\Pistol%20Pete\mpmissions\Checkpoint%20Sandybottom.Takistan\Scripts\opcomrem.sqf, line 17

    I'm not familiar with the debugging process/scripting in general. Can anyone point me to a worked example of this cjb_RemoveObjectiveToSides function?

    I'm lost here :(

  6. Sun Sep 3 08:04:49 2017
    G guttersnipe posted in removing custom objective via trigger.

    Thanks for the reply, appreciated. Will gave that a try.

  7. Sat Sep 2 16:25:07 2017
    G guttersnipe posted in removing custom objective via trigger.

    Anyone? Is there anyway to remove an objective once assigned?

  8. Thu Aug 31 22:34:07 2017
    G guttersnipe posted in arty accuracy problems.

    Tried the B_Mortar_01_F on it's own too. Seemed to be on target when I placed the module on the flat (airport), and fired at a target also on the flat (other end of airport). Noticed that when I moved the CS Arty module that the reported pitch, roll, and yaw varied according to the terrain underneath (as you'd expect), but that even mircoscopic changes made a vast difference in the impact point (0.005 degrees misses by 130m for example). Is there something up with the module's self levelling maybe? Standard editor placed copy of mortar unit hits spot on everytime when used by human player..

  9. Thu Aug 31 20:41:03 2017
    G guttersnipe posted in arty accuracy problems.

    Tried using the BIS Nato "B_T_Mortar_01_F". Same effect (if anything slightly further off target). Very puzzling, had it working well with the IFA mod stuff...?

  10. Thu Aug 31 20:09:25 2017
    G guttersnipe started the conversation removing custom objective via trigger.

    Hi, I'm trying to use a trigger to remove a custom objective named CustomObjectiveTatters

    I've been calling the script (described here - (http://alivemod.com/forum/2684-alive-and-scripting/0)

    with this in the trigger activated option

    ["CustomObjectiveTatters","GUER"] call cjb_RemoveObjectiveToSides;

    I'm getting this error

    20:39:08 File C:\Users\Pete\Documents\Arma 3 - Other Profiles\Pistol%20Pete\mpmissions\Checkpoint%20Sandybottom.Takistan\Scripts\opcomrem.sqf, line 17
    20:39:08 Error in expression <ctive", _id] call ALiVE_fnc_OPCOM;
    };
    } forEach _factions;
    } forEach OPCOM_INSTA>
    20:39:08 Error position: <forEach _factions;
    } forEach OPCOM_INSTA>
    20:39:08 Error Generic error in expression

    I've packed up the script in a .sqf named opcomrem.

    I've been using the other 'addobjective' script in the same trigger without difficulty, but can't fugure out what's wrong with the remove option.

    Can anyone help and or suggest another option to switch off an objective no longer required in scenario?

    Many thx

View more