Author: beno_83au
Author Website:

Requirements: No addons required

Version: 2.0

Short description: MIL_ExplosiveBreaching is a set of scripts that allows designated players to breach urban walls, fences and building doors using vanilla Explosive Charges.

Date: 2018-07-16 10:22


Comments: (0)
Rating:



 



MIL ExplosiveBreaching

by
beno_83au


Description:
MIL_ExplosiveBreaching is a set of scripts that allows designated players to breach urban walls, fences and building doors using vanilla Explosive Charges.

Features:
- Uses explosive charges as breaching charges.
- Optional Red/Green indicator on each charge to indicate a player's safe distance from a charge.
- Specific players can be used as designated breachers.
- All players (including non-breachers) can see effects/features of the system.
- Disorientating effects for anyone, human or AI, caught by the explosive breach.
- Single/Multiple charges can be used together.


Installation / Usage:
For usage instructions and information of how to use the MIL ExplosiveBreaching please refer to the included documentation and/or example mission.

* Mission #2 requires Advanced Rappelling to be run on the host/server only.
* Mission haven't been updated with door breaching, and still use the old system at this stage.

Recommended and/or optional addons and mods to use with xxxxxxx:
- Advanced Rappelling

***Mission makers***
    - Two variables to check if a unit's lifeState == "INCAPACITATED" have been added to account for conflicts with other lifeState checks that may be in use on other scripts.
      - e.g. Running custom revive scripts when lifeState == "INCAPACITATED".
      - In this case, it would be wrong to run the custom revive if a player was a bit too close to the breaching charge and got knocked out.
    - When being affected by breaching, a unit's lifeState will return "INCAPACITATED" for a few seconds.
    - This system makes use of publicVariables to return if a unit has been scripted into being unconscious.
    - The variables are:
      - MIL_ExplosiveBreaching_Stunned_Player & MIL_ExplosiveBreaching_Stunned_AI.
      - Each variable is a 4 index array:
        - _array select 0/1/2/3 will return number of unconscious units for BLUFOR/OPFOR/INDI/CIV respectively
    Example:
    - If a BluFor player stands too close to a door on breaching, and there's 2 AI OpFor on the other side and close enough to get knocked down the returns would be:
      - MIL_ExplosiveBreaching_Stunned_Player - [1,0,0,0];
      - MIL_ExplosiveBreaching_Stunned_AI ------- [0,2,0,0];
    - This might take some tweaking, but suits my purpose for what this breaching function was originally being made for, and so that's where it stands for now unless someone needs it changed/improved.

To use:
    - Copy the folder MIL_ExplosiveBreaching to your mission folder.
    - Anyone assigned as a breacher will require Explosive Charges ("DemoCharge_Remote_Mag") to breach.
    - To avoid damage, the better the ballistic protection of a player's vest, the safer they will be.

    - For MP use:
    initServer.sqf
    nul = [_indicator] execVM "MIL_ExplosiveBreaching\initialiseServer.sqf";
    initPlayerLocal.sqf
    nul = [] execVM "MIL_ExplosiveBreaching\initialiseClient.sqf";

    - _indicator - boolean (optional - default: true)
      - true - a safe distance indicator will spawn with the charge
      - false - no safe distance indicator will spawn

    - For SP use:
    init.sqf
    nul = [_indicator] execVM "MIL_ExplosiveBreaching\initialiseServer.sqf";
    nul = [] execVM "MIL_ExplosiveBreaching\initialiseClient.sqf";

Example:
    - This will set any group leaders as breachers:
    if (player == (leader (group player))) then {
    	nul = [] execVM "MIL_ExplosiveBreaching\initialiseClient.sqf";
    };
    - This will set player4/8/12 as breachers:
    _allBreachers = ["player4","player8","player12"];
    if !(_allBreachers find (str player)) then {
    	nul = [] execVM "MIL_ExplosiveBreaching\initialiseClient.sqf";
    };


Media:



Armaholic.com has its own Youtube channel where we will cover the Community made releases.
Subscribe to the Armaholic.com Youtube channel


Known issues:
- Sometimes walls (I think only in specific locations/circumstances) will collapse when setting a charge. This has been improved on recently but still needs work.
- Very rarely a wall may fail to be breached on a multi-breach. I've only seen it once, and couldn't recreate it so if it happens throw as much detail my way as you can.
- Door breaching has only undergone limited testing, but piggy backs off the old wall breaching function so should work fairly well.
- Multiple breaching charges placed on doors WILL NOT be removed if one is detonated. This is an immersion breaker only though, so work around it for now. A new way of handling breaching will be worked on to account for this.


Notes:
This is easily one of the more complicated things I've tried to do in ArmA, and it's taken (on and off) most of the year to get to this point. Plus, most things I try to do in ArmA are complicated, writing code is not my forte and is all self-taught (I literally just today learnt that allowDamage arguments are LOCAL!!!!!!, after over a decade of casually making missions since OFP came out of it's demo phase :down:).

If anyone happens across any bugs, or has any suggestions, please let me know. I would like to implement door breaching in the future too, so I'll see where that takes me.


Credits & Thanks:
- Credit to zorilya, who's code for aligning a bomb against a wall was offered up for use (in one of his replies in this video).
- Honestly, without the maths already being available I doubt this would've worked out for me. I'm a numbers kind of guy, but I'm no mathemagician (Simpsons reference).
- For the missions themselves, they are credit to a number of people within their briefings.
- My mates for playing my stuff in ways which no sane person plays ArmA.
- My kids for playing ArmA properly


Changelog:
v2.0
Changed - MIL_WallBreaching now becomes MIL_ExplosiveBreaching.
Changed - Folder structure was almost completely re-worked.
Changed - Breaching has now been expanded to include building doors.
Changed - Action names and priorities were adjusted for better organisation.
Added - Two variables to check if a unit's lifeState == "INCAPACITATED" have been added to account for conflicts with other lifeState checks that may be in use on other scripts (see OP for more detail).
Added - More crazy arse ArmA magic to facilitate door breaching.

There have been a number of other changes, fixes and additions that don't necessarily need mentioning, but have improved the function none-the-less.

v1.1
Added - Option to turn green/red indicators on or off (via initServer.sqf - see readMe.txt).
Fixed - Client would attempt to run initialisation even if server had not yet compiled functions.

v1.0
- Release.


Forum topic:
- BI forums
- Armaholic forums




Enable javascript to be able to download from Armaholic please!



Tags: Script,   Action,   Damage,   Modern,   Explosive,   Breach,   Wall,   Fence,   Door,   Explosive Charges