Mission Editor/Triggers

Last-modified: 2012-07-19 (木) 14:23:00

トリガーは、Conditionに記入された条件が満たされた場合に、On Act.に記入されたスクリプトを実行する、抽象的なオブジェクトです。
効果的に使われれば、ミッションをリアルでダイナミックなものにすることができます。
例えば、プレイヤーが的に発見されたら増援が来るといったことや、ラジオコマンドを使用したらコンボイが出発する、といったことができます。

トリガーは、中心部にある小さな青い旗と円形か四角形で表示されます。
グループ線でオブジェクトとリンクされたトリガーは、一般にそのオブジェクトやグループのみがトリガーを作動させることができることを意味します。
トリガーは、トリガーの位置や大きさが自体が条件の一部として使用されるということは普通はありませんし、
条件を満たしたオブジェクトを検出するだけというのも可能ですから、On Act.への記入が必ずしも必要とは限りません。
トリガーのConditionは、ミッション中に約毎秒2回の頻度でチェックされます。
トリガーをミッションに追加するためには、マップの何もないところをダブルクリックしすれば、トリガーメニューが開きます。

Menu

Arma2_editor_trigger.jpg

Axis a/Axis b

この2つの設定はトリガーの大きさをメートルで定義します。
Axis aは横軸の長さを、Axis bは縦軸の長さを表します。
トリガーが回転されていない場合(angle = 0)、Axis aは東西の長さに、Axis bは南北の長さになります。

Angle

トリガーの角度を設定します。例えば、0で北を向き、90で東を向きます。
トリガーは右クリックで選択した後、Shift+左ドラッグで回転させることもできます。

Ellipse/Rectangle

トリガーの形を選択します。Ellipseは円形を、Rectangleは長方形を意味します。

Activation

These options provide a graphical method of creating a trigger condition. The chosen Activation option generally combines with selected condition type from the six condition types below (Present, Not Present, Detected by West, etc). Some of these conditions can not be easily or efficiently recreated using script commands. Note that these options only define what value this (in the condition string) will have each time the trigger is checked. Choose who or what will activate the trigger from the drop down menu. If the trigger is linked to a unit, only the relevant options will be available. You may choose :

  • None - The trigger can still be activated when the Condition string returns true, but in this case this will always return false.
  • <side> - Which of the sides will activate the trigger when any unit of that side satisfies the currently chosen one of the six conditions below.
  • Radio <letter> - The trigger will be activated by a radio command available to all players leader of a group or possess a radio. Activation of radio triggers can be limited to specific players using the setRadioMsg command. Radio triggers do not make use of the six conditions below, or wait for the Countdown/Timeout Counters!
  • Seized by <side> - Will activate when the seizing size is deemed to be in control of the area. This trigger type works with the Timeout Counter values - a low level of dominance will activate the trigger after a period of time close to the max timeout, and visa versa. Depending on unit types, the seizing side can be completely outnumbered (4:1) and still satisfy the minimum required level of presence for the Maximum timeout counter. This trigger type can also be used with the any Detected By <side> option, meaning only units known to the Detected By side will be considered by the seized by calculation. This can easily create some interesting area domination effects. For example, a Seized by BLUFOR trigger using the Detected By BLUFOR option will activate when BLUFOR think they have seized the area, while the same trigger using Detected by OPFOR option will activate when OPFOR think BLUFOR have seized the area. The Not Present option inverts the triggers normal behaviour (ie, Not Seized by <side>).
  • Vehicle - This option is only available if the trigger is linked to an unit, vehicle or object. Only that entity can activate the trigger when it satisfies whichever of the six conditions below is being used.
  • Whole Group - This option is only available if the trigger is linked to a unit. The trigger will activate when the linked unit's entire group satisfy whichever of the six conditions below is being used.
  • Group Leader - This option is only available if the trigger is linked to a unit. The trigger will activate when the linked unit's group leader satisfies whichever of the six conditions below is being used.
  • Any Group Member - Again, this option only available if the trigger is linked to a unit. The trigger will activate when any single unit in the unit's group satisfies whichever of the six conditions below is being used.

Once/Repeatedly

Defines how many times the trigger can be activated. Only repeatable triggers can deactivate, single use triggers will remain active forever. Most repeatable triggers can only be reactivated once they have deactivated (radio triggers do not follow this rule).

Present/Not Present

If the activator is a side or object, the trigger will be activated if that side/object is or is not present within the trigger's boundaries. To be considered present, an object must be alive/undestroyed.

Detected By <side>

A unit is considered detected when the leader of any group on the detecting side can correctly identify the detected units side. Depending on the type of unit being detected, this may occur at various knowsAbout levels. The Seized by <side> Activation type also use these options, see above for details.

Countdown/Timeout Counters

These counters can add a degree of randomness to a trigger, and can make the trigger's activation less obvious to the player. For example, player immersion can be destroyed by a "enemy not present" trigger that completes an objective the very microsecond the bullet strikes the last enemy unit.

  • Countdown - Once the trigger's conditions are met the trigger will wait the specified amount of time before activating.
  • Timeout - The trigger's conditions must be met for the duration of the specified amount of time before the trigger activates. For example, if a soldier walks into a <side> Present type trigger but leaves the area before the timeout is complete, the trigger will not activate.

Below the Countdown and Timeout buttons you will see three boxes; Min, Max and Mid. These define the period of trigger activity in seconds between the Min and Max values, gravitating towards the Mid value. If all three are set to 10, then the period would be 10 seconds, with no randomness. If Min was 5, Max was 15 and Mid 10, the period would be somewhere between 5 and 15 seconds, most likely being close to 10.

Type

These are several types of trigger activation effects and abstract types that are generally unavailable through script code. These events will take place immediately after the On Activation code block is executed.

  • None - The trigger will have no other effects other than those listed in the On Activation block. This is the default.
  • Guarded by (side) - The trigger's centre point will define a point to be guarded. If the trigger is group linked to an object, it will be moved to that object's initial position during mission initialization. Guarded triggers do not activate, they only define guard points. Groups who are in Guard waypoint induced guard mode will move to the first placed (highest priority) available unguarded guard point. If an enemy unit is detected by any unit on the guarding group's side anywhere on the map, the group that is guarding the lowest priority guard point will leave their guard point to attack. Note they react over any distance, even if they are not capable of damaging the detected object. Also the normal Detected by rules do not apply - an unarmed man can detect a tank for the purposes of guarding. See the Guard waypoint type for more details. See also: Waypoint:Guard.
  • Switch - A switch trigger is very useful for "breaking" a group out of a Cycle waypoint loop, or moving the group away from a Hold or Guard waypoint. When the trigger is synchronized with a waypoint, activating the trigger will instantly change the group's current waypoint to the first waypoint after the synchronized one. Note the synchronized waypoint's On Activation block is not executed.
  • End <#> - Will cause the mission to end once the conditions are met. There are 6 different winning endings, each with a different possible debriefing text. Different endings to a mission can also lead the player down a different "branch" of a campaign.
  • Lose - Activating a trigger of this type will end the mission in failure. Note this is not the same as the death of the player. If the mission is part of a campaign, the campaign can continue along the defined losing mission branch.

Name

トリガーの名前を定義することで、スクリプトで記述できるようになります。
一般的な変数名の規則に従う必要がありますが、スペースや特殊文字などが含まれていても、警告はありません。

Text

If the trigger is activated by a radio command, this text will replace the default radio command name in both the command menu and on the radio visible on the mission map. This text will also be displayed within the editor when the mouse cursor hovers over the trigger, allowing the user to quickly identify what the trigger is and does.

Condition

The trigger will activate when this script code block returns true. If you leave the Condition box blank, the trigger will never activate. Within this block this refers to a boolean defined by whether the conditions chosen within the Activation options above are currently true or false, and thisList (or list <this trigger's name>) refers to an array of objects that are currently inside the trigger area and satisfy the trigger's Activation conditions, and thisTrigger refers to the trigger itself. Note that thisList does not always refer to units that are activating the trigger. Two exceptions are the Not Present condition, which is returns the same list as if it were a Present type (ie, returns objects of the chosen side that are inside the trigger) and the Seized by <side> trigger, which returns all units that are considered when calculating dominance (ie, if the Detected by side thinks that a unit is still within the trigger even though it is not, it will still be included in thisList). Using script code in the Condition box allows the creation of more complex trigger activation requirements, including multiple and/or conditions. The trigger checks the condition approximately once every 0.501239 seconds (averaged over 10,000 checks).

On Act(ivation)

This script code block will be executed when the trigger's conditions are met, so long as the trigger's type allows activation. Any actions defined by the trigger's Type will take place immediately after this activation block begins executing. Within the On Activation block, this is always false, thisList refers to the same array as it does in the Condition block above, and thisTrigger refers to the trigger itself like above.

On Dea(ctivation)

A script code block that will be executed the first time a repeatable trigger's conditions check returns false after having been previously true. Only repeatable triggers deactivate. Radio <letter> types do not deactivate, or at least never execute On Deactivation block. The special variables thisList and this have the same meanings as they would in the On Activation block.

Effects

Click on this button to open the Trigger Effects menu. It allows for the easy creation of some audio and visual effects that will be carried out immediately after the trigger's On Activation code block. More than one effect may be used at once. Note that most if not all of the effects in this menu could be created using script code in the On Activation block.

Condition Block (untitled)

The script code block at the top of the Effects menu can be used to require a condition that must be satisfied in order to execute the chosen effects. The block must return true in order for the chosen effects to take place. This block is checked after the trigger's On Activation code block is executed.

Anonymous

Voiceの項目に載せるまでも無く、重要度が低いと判断された音声(要するに、どうでもいい音声)を再生することが出来ます。
音源の位置とは無関係に、ミッション内のすべてのプレイヤーに聞こえます。
名前が付けられていないサウンドもあります。

Voice

トリガーが有効になった場合、音声を再生します。
音声はトリガーを有効にしたユニットの近くで再生されます。
トリガーがユニットとグループ線で繋がれている場合、ユニットが喋ります。
再生された時に、文字が画面に表示されない音声もあります。

Environment

ミッション中に再生される環境音を設定できます。
しかし、一般に環境音はプレイヤーの位置や天候、時間に基づいて自動的に再生されるため、テスト以外ではあまり使わないかもしれません。

Trigger

再生されるサウンド・エフェクトを選択します。音源はトリガーの中心となります。

Track

トリガーが有効になった時に再生される音楽を選択します。
新しい音楽が再生される場合、それまでに再生されていた音楽は停止します。

Type

Defines the creation of one of the following types of visual effects:

  • Object - This is apparently used to create a pre-defined 3d object in front of the player's field of vision.
  • Resource - This can be used to display pre-defined graphical resources over the player's field of vision. This resource can be chosen from the Text drop down menu below.
  • Text - will display the text entered in the Text box below, in the style chosen in the Effect menu. This effect is identical to the cutText script code command.
  • Effect - Will only have an effect if Type is not "NONE", and the Text box is not empty. It creates the same visual screen effect as the cutText command would given the same type.

Text

This option will only be available if Type is not set to "None". It will either behave as a drop-down list of available Resource or Object types, or a box in which to enter text.