Jump to content

Recommended Posts

Hello!

Is it possible to change a task destination during mission?

 

I tried

tsk1 setSimpleTaskDestination markerPos "NEWMARKER"

but it had no effect at all.

 

thx in advance

Share this post


Link to post
Share on other sites

Is it possible to change a task destination during mission?

 

No, it's not possible at the moment. I'm considering adding it though.

 

The only possibility of a "moving" task marker is tying it to an object, even an invisible one (like an invisible H) and moving that to a new position.

Share this post


Link to post
Share on other sites

No, it's not possible at the moment. I'm considering adding it though.

 

The only possibility of a "moving" task marker is tying it to an object, even an invisible one (like an invisible H) and moving that to a new position.

 

Thx for the reply.

I tried this. Moving the marker works perfectly, but the task destination stays where it was in the beginning.

 

PS: I took the liberty to make a change to the tasktracker.

I inserted a line so that I can reassign a previously assigned task.

I hope that's okay for you!
 
regards

Share this post


Link to post
Share on other sites

Thx for the reply.

I tried this. Moving the marker works perfectly, but the task destination stays where it was in the beginning.

Yeah, tasks either are tied to an object, or a position, but the marker isn't an object so giving the position to the task will "decouple" it from the marker, basically.

 

 

PS: I took the liberty to make a change to the tasktracker.

I inserted a line so that I can reassign a previously assigned task.

I hope that's okay for you!

Sure, as long as you don't redistribute it "standalone", you can modify it.

What do you mean with "reassign" ?

Share this post


Link to post
Share on other sites

Sure, as long as you don't redistribute it "standalone", you can modify it.

What do you mean with "reassign" ?

 

I modify only for personal use.

 

Maybe I have to mention that I'm still working on ArmA II, therefore I'm not using the newest TT version.

 

Hard to explain, my english ain't that good.

With "reassign" I mean to set a task state to assigned again after it was already assigned before.

That didn't work until I inserted this line into FHQ_TT_markTaskAndNext:

[_this select _i, "current"] call FHQ_TT_setTaskState

 

Hope that was at least somewhat understandable.  :unsure:

Share this post


Link to post
Share on other sites

I modify only for personal use.

 

Maybe I have to mention that I'm still working on ArmA II, therefore I'm not using the newest TT version.

 

Hard to explain, my english ain't that good.

With "reassign" I mean to set a task state to assigned again after it was already assigned before.

That didn't work until I inserted this line into FHQ_TT_markTaskAndNext:

[_this select _i, "current"] call FHQ_TT_setTaskState

 

Hope that was at least somewhat understandable.  :unsure:

 

Yeah, gotcha.

Nice to hear someone is still making missions for Arma 2. There are still some things I miss from the Arma 2 days

Share this post


Link to post
Share on other sites

Hi there,

 

currently I'm looking for a way to create JIP-proof tasks to spice up an ALIVE mission and found this addon/script suite. 

 

I managed to make it work partially in a dedicated server environment:

 

  • Briefing creation - works!
  • Task creation - works!
  • Check task state - works NOT!

 

What I mean is the tasks appear, can be assigned or unassigned and if I fulfill the conditions, follow-up signs like hints or other tasks made with traditional BIS system pop up.  I have attached some screenshots of my setup via dropbox link that should make clear what I want to achieve:

 

https://www.dropbox.com/s/3esskq7p6cwyd86/Screens%20tasks%2Btriggers%20tourist.7z?dl=0 

 

 

My goal is to simulate an intel gathering meeting that makes the task to blow up a fuel depot appear only after a random amount of time set in the trigger that checks if task_0 (the meeting) is succeeded.  Then I want the task_06 to succeed as soon as the fuel depot is blown to pieces.  I can see the conditions are read by the game since the hint appears when the fuel depot is destroyed. 

 

BUT: neither this task nor the initial meeting task ever appear as completed in the tasks section if intel. 

 

Please share advice on how to achieve this kind of linked tasks and thanks in advance for your help,

 

tourist

Share this post


Link to post
Share on other sites

Uhm, is it intentional that you create the task as, for example "task_6" but when you later access it via script, you refer to it as "task6", i.e. without the underscore character ?

Share this post


Link to post
Share on other sites

OMG, it's always one _ or { or [ not placed right and the ARMAGIC stops working... I feel sooo... :banghead: :icon_redface: :face_palm:

 

 

After making the task names consistent following your advice I got the tasks to go into complete once conditions were met.  But still I'm not sure which code sequence and trigger architecture to use if I want a task to appear ONLY after the other task has already been completed.  This did still not work with the above setup after I had  I corrected the tasknames: I saw the task to bomb the fuel depot right from the beginning.  How could I achieve the creation and visibility of the task to happen ONLY after task_0 is complete?

 

Thanks for your patience and I hope you can show me to the light once more...

Share this post


Link to post
Share on other sites

OMG, it's always one _ or { or [ not placed right and the ARMAGIC stops working... I feel sooo... :banghead: :icon_redface: :face_palm:

 

I'm a software developer, I know that problem, trust me... you stare at something for hours, and someone just walks by and casually says "you're missing a semicolon in line 110"...

Regarding making tasks appear later: Currently, this does not work via the GUI, you have to create the tasks by script when you need them.

  • Like 1

Share this post


Link to post
Share on other sites

Ah, ok, I'm trying to do it with the code from this thread here:

 

Where did you actually put the code ?

One thing I notice that a lot of people have misconceptions about is when and how code is run. For example, if you simply put this code you mentioned into your init.sqf, it will only be checked once while init.sqf is running. it will never be run again.

If you want code to be run "as soon as something happens", it has to be in a trigger or a spawned script that sits in the background, waiting.

For example, this code:

if (["task1c"] call FHQ_TT_isTaskCompleted) then {
[Chaos1a,
["task1d", "Three weeks ago, UGR launched an offensive on a lightly guarded joint base and seized stored weapons and supplies. They have occuppied the base and conduct security patrols as a show of force. Raid the base IOT eliminate the leadership within and destroy all stored supplies.", "Raid Supply Depot", "", getmarkerpos "Spawnpoint3", "assigned"]
] call FHQ_TT_addTasks;
};


will only be checked once when the script it's in executes. If you wanted to "watch" the task and create a new one once the task is finished, you'd need a trigger:

Place a trigger on the map, and put this in it's condition field:

["task1c"] call FHQ_TT_isTaskCompleted


Then, in the OnActivated field, put this

[Chaos1a,
["task1d", "Three weeks ago, UGR launched an offensive on a lightly guarded joint base and seized stored weapons and supplies. They have occuppied the base and conduct security patrols as a show of force. Raid the base IOT eliminate the leadership within and destroy all stored supplies.", "Raid Supply Depot", "", getmarkerpos "Spawnpoint3", "assigned"]
] call FHQ_TT_addTasks;


When the mission runs, the trigger will run the condition field code every frame, and check whether it's true. If it is, it fires the trigger "OnActivated" code, which creates a new task

 

But I'm unsure for what Chaos1a stands: the side, task group or a single soldier?

Share this post


Link to post
Share on other sites

 

But I'm unsure for what Chaos1a stands: the side, task group or a single soldier?

 

It's not a task or task group (in fact, the underlying script doesn't know the task groups), but a filter entry. This CAN be a group, or a single soldier.

In the simplest form, if you want everyone to receive the new task, you just write {true} there, i.e. a piece of code that always returns true.

Otherwise, you need to know who you want to get the new task, and "list" them there.

A simple method for this is if you name all your playable units in the game. Assume you have 10 playable units, set their "variable" field to p1, p2 and so on until p10. Then, instead of the Chaos1a above you could list all the units that should receive the new task in an array like [p1, p2, p3] if players 1 to 3 should get the task.

If you have organized your playable units in different groups, you can name the group from within Eden (double-click on the group "flag" and enter a name in the variable field), so assuming you have, say, two groups, group1 and group2, and you only want group2 to get the task, you'd write group2.

 

Hope that helps

 

Edit: Note, the example uses old names, FHQ_TT_addTasks is now FHQ_fnc_ttAddTasks

Share this post


Link to post
Share on other sites

Thanks for the help with that part of the code! 

 

There's another question that I couldn't even find reference to in this thread: Have you or has another user before me ever successfully used FHQ in an ALiVE persistent mission to save task states over a play - save- quit - load - cycle?

 

I'm just asking because the other FHQ tasks that I have made with FHQ EDEN interface and that I want to show up to all players at mission start intentionally work fine (task states show correctly, triggers work as intended to finish these meeting style tasks) when actually ingame, but after making an ALiVE savegame and the next day or so loading that, the tasks are reset and can again be completed. 

 

Do you think that it is possible at all to make tasks persist over a multisession MP mission on dedicated server with ALiVE?  

Share this post


Link to post
Share on other sites

Do you think that it is possible at all to make tasks persist over a multisession MP mission on dedicated server with ALiVE?  

 

I have no idea about ALIVE, I'm afraid, but the task states are correctly saved and loaded if the mission is saved and loaded via the normal means, at least in SP. I haven't actually tried that in multiplayer, but there's no reason it shouldn't work

Share this post


Link to post
Share on other sites

I sure as well that if it works in SP, any MP mission saved and resumed with BIS system will also save and load your tasks correctly.  And in the ALiVE mission building modules there is an option to activate task persistence which sounds promising for what I want to achieve.  It is, however, designed to save the status of the AliVE generic tasks that you can have autogenerated or call for once ingame.  It was actually in the ALiVE forums that SavageCDN, a very helpful community member and ALiVE tester, suggested I should try task editing systems like SHK if BIS tasks made with BIS module wouldn't offer me persistence.  I looked around what was there ans did  quickly come to the assumption your FHQ is the most actively maintained and user friendly system, so I'm glad you lived up to those demanding expectations. :D 

 

I'll keep you updated on my endeavours with the ALiVE saving and will gladly come back here if I need help with FHQ tasks - and I haven't even tested them in RAVAGE MP where I also was disappointed from BIS task system not bringing task states over into a loaded save (RAVAGE uses missionNameSpace for saving I think), so you really gave me the tools to enhance my favourite mods even more! :thumbsup:

 

Hopefully I get it to work in Dedicted server games, and hopefully you stay patient with me when I will inevitably drop in the thread for asking some more questions!

Share this post


Link to post
Share on other sites

Sorry for being so thick, but I can't get the trigger created task to work...

 

This is the code I have in the trigger meant to create it:

[west,  
       ["task_03", "Die Separatisten haben viele  Werkstätten, Munitionsdepots und Treibstofflager hinter der Front errichtet.  Zeigen Sie ihnen, dass ihre Vorräte nirgendwo sicher sind!", "Zerstören Sie die Fahrzeugwerkstatt!", "", getmarkerpos "tanke_1_marker", "created","destroy"] 
   ] call FHQ_fnc_ttAddTask; 

The condition is meeting_guer; in the condition field.  It becomes true when the working task_00 as defined in the FHQ EDEN interface is succeeded.  That works well, so the condition is fulfilled.  I tried with

_res = ["task_00"] call
FHQ_fnc_ttIsTaskSuccessful;

in the condition field first, but I thought maybe just this isn't working, so I switched to the 100% working way with the meeting_guer=true; condition set to true in the task_00 completing trigger and then called for that as condition. 

 

What did I do wrong this time?

Share this post


Link to post
Share on other sites

 

What did I do wrong this time?

 

Note that the code has to run on the server. You need to make sure that it's the server that runs the code, executing on a client will do nothing.

[west,  
 ["task_03", "Die Separatisten haben viele  Werkstätten, Munitionsdepots und Treibstofflager hinter der Front errichtet.  Zeigen Sie ihnen, dass ihre Vorräte nirgendwo sicher sind!", "Zerstören Sie die Fahrzeugwerkstatt!", "", getmarkerpos "tanke_1_marker", "created","destroy"] 
] remoteExec ["FHQ_fnc_ttAddTask", 2]; 

This should do the trick

Share this post


Link to post
Share on other sites

Sorry boss, can't get it done!

 

Still even with your addition of

] remoteExec ["FHQ_fnc_ttAddTask", 2];

it doesn't fire the new task in MP dedi.  Tried SP, too, but that doesn't work either.

Share this post


Link to post
Share on other sites

Does the trigger actually, well, trigger ? What happens if you execute that code from within the debug console ?

 

Edit: The function name is of course FHQ_fnc_ttAddTasks, i.e. with a plural 'S' at the end. Sorry about that

Share this post


Link to post
Share on other sites

Sadly, it still doesn't work.  The trigger definitely fires, though; I checked it by setting it to play a custom music track when activated and that happens after the first task is succeeded and it's condition meeting_guer is set to true. 

 

Also no luck with the console; tried local, server and global execution and had no effect.

Share this post


Link to post
Share on other sites

Sadly, it still doesn't work.  The trigger definitely fires, though; I checked it by setting it to play a custom music track when activated and that happens after the first task is succeeded and it's condition meeting_guer is set to true. 

 

Also no luck with the console; tried local, server and global execution and had no effect.

Please quote the full content of what you have in the trigger

Share this post


Link to post
Share on other sites

I'll go for screenshot pics again; minimizes the error margin of a typo...

 

https://www.dropbox.com/s/iyg3d5kin30hp1u/Screens%20task%2Btrigger%20tourist%202.7z?dl=0 

 

2 Pics since the code in OnActivation isn't visible completely, and here it comes as-is:

[west,   
 ["task_03", "Die Separatisten haben viele  Werkstätten, Munitionsdepots und Treibstofflager hinter der Front errichtet.  Zeigen Sie ihnen, dass ihre Vorräte nirgendwo sicher sind!", "Zerstören Sie die Fahrzeugwerkstatt!", "", getmarkerpos "tanke_1_marker", "created","destroy"]  
] remoteExec ["FHQ_fnc_ttAddTasks", 2]; 

Share this post


Link to post
Share on other sites

Just to make sure, you're not blacklisting anything on the server ? remoteExec is subject to a whitelist, as soon as you have a class CfgRemoteExec in your description.ext, campaign or add, you will have to specifically whitelist functions that are remote executable.

See here for an explanation

Share this post


Link to post
Share on other sites

No, I don't blacklist anything and I don't even have a class CfgRemoteExec in the description.ext.  Is it necessary to have this to make FHQ dynamic tasks work or did you just ask for troubleshooting? 

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

×