-
Notifications
You must be signed in to change notification settings - Fork 0
Morse Bomb
This bomb requires knowledge about International Morse Code (with 26 letters and 10 numerals + whitespace/space). Ref: https://en.wikipedia.org/wiki/Morse_code A player need to decode the message and enter the solution message prepared by mission creator or game master.
This module let's you setup a Morse bomb which has the following features:
- Can be applied to any object.
- Can be defused by entering a code via GUI.
- Can be given a serial number (not usable ATM but you can think about using it in your scenario, maybe tell players the solution code after they give you bomb's serial number)
- Can be given an "after defuse" function that will be run locally for the defuser player.
- Can be configured with max defuse attempts.
- Explodes on bad solution message.
- Explodes when receiving a shot.
- Explodes on nearby explosions.
0: the thing that the script should be attached to
1: NUMBER - the bomb time (0 = no time, the bomb will explode only on wrong code)
2: BOOLEAN - if the boom should beep every second
3: NUMBER - max (wrong) defuse attempts. Default: 1 (one chance to defuse the bomb).
4: STRING - the encoded message (only 26 letters and 10 numerals from https://en.wikipedia.org/wiki/Morse_code are supported) that will be presented for the player
5: STRING - the solution message. This message is required to be entered by the player as a response. Case insensitive.
6: STRING - the explosion class name to use
// "ammo_Missile_Cruise_01" (very big)
// "helicopterExploBig" (big)
// "DemoCharge_Remote_Ammo" (medium)
// "APERSMine_Range_Ammo" (small)
7: BOOL - if the bomb should NOT be vulnerable to shots and nearby explosions after successful defusal. Default: false
8: STRING - the bombs's serial number. Not used by the mod.
9: CODE - after defuse function. Executed LOCALLY when bomb is defused. Passed parameters are ["_bomb", "_defuserPlayer"].
10: BOOL - optional, if the script should be run globally. Can be skipped in most cases.
The simplest bomb with default values.
_myBombThing = target object. Use this when in init EDEN field.
[_myBombThing, 60, true, 1, "549103", "549103"] call abombs_main_fnc_init_morse_bomb_full; // Where _myBombThing is the target object reference.
A morse bomb with indefinite timer, encoded message "YOUR ZEUS KNOWS THE ANSWER" and solution code 1337, beeping sound and big explosion:
[_myBombThing, 0, true, "YOUR ZEUS KNOWS THE ANSWER", "1337", "ammo_Missile_Cruise_01"] call abombs_main_fnc_init_morse_bomb_full;
Sam as above but with custom serial number, custom after defuse function and removal of shot/explosion vulnerability after defuse.
[
_myBombThing, // Bomb object
0, // Bomb time
true, // Should beep?
3, // Max defuse attempts
"YOUR ZEUS KNOWS THE ANSWER", // Beep-ed morse code to the player
"1337", // Solution code
"ammo_Missile_Cruise_01", // Explosion class name
"true", // Remove shot vulnerability on defuse
"KWX123-334-99", // Serial number
{
params ["_bomb", "_defuser"];
// Shows a notification to all players about who defused the bomb.
["TaskSucceeded", ["", format ["%1 defused the bomb!", name _defuser]]] remoteExec ["BIS_fnc_showNotification", _bomb];
}
] call abombs_main_fnc_init_keypad_bomb_full;
For the latest documentation/examples see Morse Bomb function file.
To convert objects to keypad bombs, synchronize them with the module.
- Open an issue here on Github if you want to report a bug or suggest an enhancement
- Comment on Workshop Page
- Join my Discord server and contact me there