Generate task via trigger

  1. 7 years ago

    So I'm working on script that will allow me to generate task from module.
    I dont want to use tablet for this.

    I've read one conversation about autogenerating task and this is what I've got

    in object ini

    this addAction["Assign Task", "tasks.sqf", nil, 6, True, True, "", "(_target distance _this) < 4"]

    tasks.sqf

    task = ["Assassination", "Sabotage", "MilAssault", "DestroyVehicles", "DestroyInfantry"] call BIS_fnc_selectRandom; //returns one of the variables
    ALIVE_autoGeneratedTasks = [task];
    PAPABEAR = [West,"HQ"]; PAPABEAR sideChat "Confirmed. Unit is available for immediate tasking.";
    // hintSilent str ALIVE_autoGeneratedTasks; // Debug. Lists selected mission as hint.
    
    ALIVE_autoGeneratedTasks = [""];
    PAPABEAR = [West,"HQ"]; PAPABEAR sideChat "Confirmed. Unit is unavailable for tasking at this time.";

    So each time I chose "Assign task" from my object action I want C2ISTAR to generate task for me.

    I see I'm missing this part of code that execute generating missions....right?

    Any help please?

  2. Have you had any luck with this at all? Sounds like a useful idea with loads of potential applications. Did the above script not do anything?

  3. The above will only set the list of available tasks for autogeneration, you'll need to hunt down the code that handles the actual creation and assigning of the task.

  4. Ah yes of course, wasn't paying attention. I've had a look through the C2ISTAR code and although I think I've located the task creation code, I'll have to spend a bit more time before I can put that into any usable function. @mrsurv I'll try to get it working over the next couple of days and get back to you!

 

or Sign Up to reply!