Jump to content

Recommended Posts

Hello, everyone!

I am trying to create a task for my current mission using the data terminal (Land_DataTerminal_01_F) from Things/Military in the Eden editor. I am using a script in object's init field that automatically creates a task which Title and Description can be modified inside the script. This is the script I have used:

 

MGITerminal1 = this;
[MGITerminal1,"red","orange","green"] call BIS_fnc_dataTerminalColor;
MGITerminal1 addAction ["Activate terminal",{
MGITerminal1 removeAction (_this select 2);
MGITerminal1 spawn {
   [_this,3] call BIS_fnc_dataTerminalAnimate;
   sleep 10;
   firstTask = ["task0", true, ["Description here","Title here",""],nil, "ASSIGNED", 0, true, true,"",true] call BIS_fnc_setTask;
  [MGITerminal1,0] call BIS_fnc_dataTerminalAnimate
}
}];

What I want to do is create a completed task using Create Task - Succeeded or Set Task State and a connected trigger that checks if the data terminal has been used or if I have interacted with the object itself that can be named for this purpose. Do you have any suggestions? Perhaps that could be a script that checks if another object is alive. I have used such scripts already, but how can I make it happen using one of these methods or anything else? Thank you in advance.

Share this post


Link to post
Share on other sites

Just set an variable switch false/true than spawan waituntil variable is true than task succeded

Share this post


Link to post
Share on other sites
On 10/1/2018 at 1:42 PM, black_hawk_mw2_87 said:

What I want to do is create a completed task using Create Task - Succeeded

["task0", "SUCCEEDED"] call BIS_fnc_taskSetState;

 

Put that line below  }];  in the above script. May want to add a sleep.

sleep 5; //pauses before succeeding the task.

["task0", "SUCCEEDED"] call BIS_fnc_taskSetState;

 

Hope I'm understanding you right.

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

×