Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
pierremgi

Player(s) can decide when a task is done!

Recommended Posts

Hi all,

Just a little way about how you can achieve a task (succeeded) when you decide it.

 

The Arma task framework is fine. You can set tasks then add conditions for making them automatically successful (or else) and then proceed to the next and so on.

Well...

In real life, there is not so often a software telling you: "good guy, you've swept all the mines without error".

 

In Arma, most of the scenarii are made like this:

Let's set a task for demining an area (marked on map, I let you decide how to mine and where)
The create task module (or equivalent in script) could be:

owner : groups of synchronized objects (by default)

Task ID : task1     // important to be set

Title  :  Clear the mined area

Description : Sweep all mines in this area

 

then, usually, the scenario maker add a trigger above this area and set a condition like:

count (allMines select {_x inArea thisTrigger}) == 0

to activate the trigger, synced to the task state module, synced to the create task one,.. iot declare the task as succeeded, with a green title popup. tadaaa

So, in game, once there is no more active mine in the area (swept or exploded), the task is done.

Marvelous.

 

But, as said, real life is not often so mathematical, and, foot in mud, the guy(s) must decide when the task is done, and then report to HQ.

How to do that?

 

Place a same create task module in editor, remove (or not) the trigger and the stask state, and just modify the description field of the create task module by:

Sweep all mines in this area. <execute  expression = " ['task1','SUCCEEDED',true]  call Bis_fnc_taskSetState">report when done.</execute>

 

The task will be successful and marked as done (exactly as previously), when a player clicks on the link in description of the task, but without guarantee there is no forgotten active mines.

 

You can even work with some possibilities (limited by the fact there is no parameters passed in the expression string).

Example : modify the description for pointing at who decided the task is done (should work in MP, not deeply tested)

 

Sweep all mines in this area.  <execute  expression = " ['task1', [name player + ' did it', ('task1' call bis_fnc_taskDescription) #1 , '']] call BIS_fnc_taskSetDescription;['task1','SUCCEEDED',true]  call Bis_fnc_taskSetState">report when done.</execute>

 

Have fun!

  • Like 1

Share this post


Link to post
Share on other sites

×