Fandom

武装突袭 Wiki

Tasks

简体 | 繁體

4,827个页面创建
于此维基上
添加新页面
评论0 分享

您使用了广告屏蔽软件!


Wikia通过广告运营为用户提供免费的服务。我们对用户通过嵌入广告屏蔽软件访问网站进行了使用调整。

如果您使用了广告屏蔽软件,将无法使用我们的服务。请您移除广告屏蔽软件,以确保页面正常加载。

Description 编辑

Tasks were introduced in ArmA 2. They replaced the old objective system used in Armed Assault and Operation Flashpoint.

Basics 编辑

Creation 编辑

Tasks can be created at any time from anywhere (trigger, script, etc). They do not need to be created in a file called "briefing.sqf".

Hiding 编辑

As opposite to the old method of showing and hiding objectives, tasks are instead created "on the fly" as they are required.

State 编辑

Task state is in String format. The possible state of a task is one of these:

  • "Assigned"
  • "Canceled"
  • "Created"
  • "Failed"
  • "Succeeded"

Icon / Color 编辑

Arma 2

  • Assigned: gray
  • Canceled: one gray diagonal line
  • Created: black (empty)
  • Failed: red X
  • Succeeded: green

Good To Know 编辑

Creation 编辑

Tasks are unit (object) specific. They are created to a unit and not to a client (human player).


For example:

You start mission in a unit which is named "unit1". The briefing creates following task:

task1 = unit1 createSimpleTask ["taskName1"]

Now, if you teamSwitch to another unit, he will not have the task. This is common with the usual "task = player createsimpletask" type of creation as the task will only be created to the unit player is referring to.

Return Variable / Handle 编辑

Command createSimpleTask returns a handle (variable which refers to the created task). Each task has a unique handle. Even using same line of code on different client will result in a different handle for the "same" task.


Examples 编辑

Creation 编辑

Simplest 编辑

task1 = player createSimpleTask ["taskName1"];

Common 编辑

task1 = player createSimpleTask ["taskName1"]; task1 setSimpleTaskDescription ["To be successful in this example task you need to...","Example Task",""];

Advanced 编辑

task1 = player createSimpleTask ["taskName1"]; task1 setSimpleTaskDescription ["To be successful in this example task you need to...","Example Task",""]; task1 setTaskState "Assigned"; player setCurrentTask task1;

Update 编辑

Simplest 编辑

task1 setTaskState "Succeeded";

Common 编辑

task1 setTaskState "Succeeded"; task2 setTaskState "Assigned"; player setCurrentTask task2;

Advanced 编辑

task1 setTaskState "Succeeded"; task2 = player createSimpleTask ["taskName2"]; task2 setSimpleTaskDescription ["Another task has been issued...","Another Example Task",""]; task2 setTaskState "Assigned"; player setCurrentTask task2;

See also 编辑

briefing

更多维基

随机维基