指定したサイドのユニットを発見した後、その中から1ユニットを選んで全速力で接近して自爆するユニットを設定するためのスクリプトです。
下の文例のようにユニットのInit欄に記述した場合、West(BLUFOR)のユニットを攻撃し、成功確率は30%です。
nul = [this] execVM "Suicidebomb.sqf"
トリガのonAct欄に記述し、この範囲内に居る指定したサイドのユニットからランダムで1ユニットを選んで自爆攻撃をさせることも出来ます。
成功確率70%で50m以内のWEST側のユニットを見つけて攻撃します
nul = [thislist select floor(random count thislist), WEST, 7, 50] execVM "Suicidebomb.sqf";
_unit = _this select 0; // Bomber unit, set randomly by trigger.
_side = if (count _this > 1) then {_this select 1} else {WEST}; // Side to attack, default West.
_prob = if (count _this > 2) then {_this select 2} else {3}; // Probilitiy of attack once a target is found, Number 1 - 10, higher = more chance. Default 3 (30% chance or so);
_range = if (count _this > 3) then {_this select 3} else {20}; // Range to look for targets in, default 20m.
_warn = if (count _this > 4) then {_this select 4} else {true}; // Option to warn the attacked group, all group members will target the bomber, AI won't shoot civs though. Default true.
_shout = if (count _this > 5) then {_this select 5} else {false}; // Option to make the bomber say a sound (declared below) before attacking. Default false.
_sound = "allahu"; // Sound file declared in CfgSounds in description.ext for use with _shout option.
サンプルミッション