Bomber - Theseus-Aegis/MissionTemplate GitHub Wiki

This page will explain the usage of the Bomber function.


/*
 * Author: Mike, Jonpas
 * Sets up a unit as a suicide bomber, they will wait until a player comes within the Activation distance and sprint at them to detonate.
 * Will use either a Satchel charge or a Demolition charge.
 *
 * Call from initServer.sqf
 *
 * Arguments:
 * 0: Suicide Bomber <OBJECT>
 * 1: Detonation Radius <NUMBER> (default: 10)
 * 2: Activation Distance <NUMBER> (default: 100)
 * 3: Screaming Distance <NUMBER> (default: 100) (should match activation distance)
 *
 * Return Value:
 * None
 *
 * Example:
 * [bomber] call MFUNC(bomber)
 * [bomber, 15, 50, 50] call MFUNC(bomber)
 */

Usage

This function will actively turn any unit (armed or otherwise) into a suicide bomber. It will add a suicide vest to the unit.

It will pick a random player within its radius, begin screaming and start running at them. If it dies it explodes, if it goes unconscious it explodes, if it reaches its detonation radius to its target, it explodes!

Called from initServer.sqf

Example (Using defaults):

[My_Unit_Variable_Name] call MFUNC(bomber);

Example (Without defaults):

[My_Unit_Variable_Name, 5, 50, 50] call MFUNC(bomber);

The parameters are:

  • 0: The Unit
  • 1: Detonation Radius (Distance required for detonation)
  • 2: Activation Distance (Distance between Unit & Player before bomber will actively seek a target)
  • 3: Screaming Distance (Distance you should be able to hear the unit screaming at you. Should match above.)
⚠️ **GitHub.com Fallback** ⚠️