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)
*/
This function will actively turn any unit (armed or otherwise) into a suicide bomber. It will add a suicide vest to the unit.
When calling this function the default values are considered fair and optimal. Deviating from these will probably result in either unfair or strange behaviour.
Bombers that are killed will explode immediately, ones knocked unconscious will be killed by the function itself and will explode at a random point in the next 5 minutes.
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.)