Jump to content
Sign in to follow this  
0verlord-actual

Dynamic Breaching and locking doors

Recommended Posts

Is their any kind of breaching mod or script like the one used is MCC?

That is dynamic meaning players can lock the door in any building with for example a tool kit and the other team can breach any door that is locked with a shaped charge like the claymore for example only if they have one on hand.

How would you go about the scripting so the actions would only be available while the player is say within a metre of the door? Or looking at one? And so the door would fly open once the charge was set off?

I am interested in trying to make a dynamic breaching and locking script but I am a novice when it comes to scripting and I feel it's not an easy starting point.

Share this post


Link to post
Share on other sites

It's exactly what MCC do, except the possibility to lock doors. They could also add the feature in a future release.

Sorry I can't help in scripting...I'm bumping the thread hoping someone can help you :) It's an interesting idea anyway...I would just work on the charges to just explode and open the door without damaging the breaching team, only who stand beyond the door...MCC doesn't do that so well. This would help the breaching mechanics.

Oh, how much would be great if BI would work on some good CQB...we have mods with some nice shotguns but no real situations that need them...

Share this post


Link to post
Share on other sites

Yeah thanks for that. yeah well using the shaped charge like claymores kind of protects the breaching team. The MCC version allows the player to lock doors also as long as they have a multitool on them. I would love to help someone write a script to do this, I just know that I am not skilled enough to do it. There is a breaching script already made by someone else (unsure of the name) but it relies on pre-placed triggers to open the door and I want one that can be used on any door like MCC.

Share this post


Link to post
Share on other sites

Humm.. i try to give you some starting point..

  1. For now, i don't know but i think you can't destroy only the doors of any building.
    But you can access to the doors position by selectionPosition command.
    And you can animate that door with animate command.
    Like this:
    // this command give you the position offset of the door on the building
    _nearBuilding = (nearestBuilding player); 
    _doorOffset = _nearBuilding  selectionPosition "Door_1_trigger";
    
    // so, to get the exact position you can use modelToWorld
    
    _nearBuilding modelToWorld _doorOffset;
    
    
    //to animate the door:
    
    _nearBuilding  animate ["door_1_rot", 0]; //Close
    _nearBuilding  animate ["door_1_rot", 1]; //Open
    


    Now, you need to know how many doors in the building are.. you can take a look into configFile

    _nearBuilding = (nearestBuilding player);
    _numDoors = getNumber (configFile >> "cfgVehicles" >> typeOf _nearBuilding >> "numberOfDoors"); 
    
    //now, you can make a loop with _numDoors
    for "_indx" from 1 to _numDoors do {
       _doorAnimName = format ["door_%1_rot", _indx];
       _nearBuilding animate [_doorAnimName, 1];
    };
    


    with this you can place a WeaponHolder/Trigger/GameLogic or anything on the offsetPosition, and add an action to that. (on Condition "(_target distance _this) < 2")
    Also you can check how far is the unit from the door with distance command

  2. To lock the doors you need to do:
    _nearBuilding = (nearestBuilding player);
    _nearBuilding setVariable ['bis_disabled_Door_1',1];


Maybe if you make a "onEachFrame" EH with BIS_fnc_addStackedEventHandler and check all the things above you can make a good Breaching and locking script.

Hope this helps

take a look on this..

Edited by KoVValsky

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×