Jump to content
LuzifR

CZ75 Breaching Doors Script

Recommended Posts

Did a few tests : 

  1. For the script, I removed the intro and the last coded line (they seemed for the pbo only).  Make the installation instructions clearer if a copy-paste of the whole pbo content is not appropriate.  They are not clear at the moment for a noob.  I only kept what starts with if and I kept the last );
  2. The scripts contains mission data and West units specs (?) 
  3. I get a script error around line 70.
  4. Otherwise it works : doors are locked. 
  5. Various mines can blow the doors open
  6. Grenades do not open doors.
  7. As for gun damage, I only tried 0.45 ammo shots (which did not open the door). 

Share this post


Link to post
Share on other sites

By removing all the needless mission code after

version=53;

 it all works fine without an error. 

 

For those who do not know also : remove everything before:

 if (!isServer) exitWith {};

and save that as a simple text file called cz75_breachingdoors.sqf and placed in your mission folder.

Share this post


Link to post
Share on other sites

possible to get this script to use a demo charge rather than a claymore? Claymores are anti personnel  not typically utilized in demo  breaching. The vanilla game does have explosive charge blocks, which would be more logical and accurate.. 

Share this post


Link to post
Share on other sites
1 minute ago, WarhammerActual said:

possible to get this script to use a demo charge rather than a claymore? Claymores are anti personnel  not typically utilized in demo  breaching. The vanilla game does have explosive charge blocks, which would be more logical and accurate.. 

just go through it and change the name of the addaction and change the object that is placed to the class name of the demo charge

Share this post


Link to post
Share on other sites
5 minutes ago, gokitty1199 said:

just go through it and change the name of the addaction and change the object that is placed to the class name of the demo charge

I hought of that , however I can not find in the script where its specifically calling for the claymore... Unless I'm totally blind 

Spoiler

/*
Breaching-Doors-script for ArmA3-Buildings by LuzifR (v0.07)
------------------------------------------------------------
Squadpage: http://steamcommunity.com/groups/cz75-squad

Description:
    This script locks doors or gates of ArmA3-Buildings in a trigger area and makes it possible to force open them with a Claymore charge.

Execution from a trigger:
    Size            - Script is running for every building or gates in the trigger area.
    Condition        - true
    On Activation        - 0=[thisTrigger] execVM "cz75_breachingdoors.sqf";

Parameter:
    Trigger name        - Variable Name of the trigger (default: thisTrigger)
    Buildings percentage    - How much percent (0-100) of buildings with closed doors (default if empty: 100)
    Doors percentage    - How much percent (0-100) of closed doors (default if empty: 100)
    Building class        - Which classes of buildings have closed doors (default if empty: "Building")

Examples:
    - In this case all doors of all buildings or gates in the triggerarea are closed:
        0=[thisTrigger] execVM "cz75_breachingdoors.sqf";
        (equal to: 0=[thisTrigger,100,100,"Building"] execVM "cz75_breachingdoors.sqf";)

    - In this case in 20% of all buildings or gates in the triggerarea all doors in this building are closed:
        0=[thisTrigger,20,100] execVM "cz75_breachingdoors.sqf";
    
    - In this case 50% of the doors of all Military-Cargo-HQ buildings in the triggerarea are closed:
        0=[thisTrigger,100,50,"Land_Cargo_HQ_V1_F"] execVM "cz75_breachingdoors.sqf";
*/

if (!isServer) exitWith {};

sleep 2; // To make sure the script works with placed buildings

private ["_trigger","_randomBuildings","_randomDoors","_classes","_count","_doors","_i"];

// Defaults
_trigger = _this select 0;
_randomBuildings = 100;
_randomDoors = 100;
_classes = "Building";

_count = count _this;
if (_count > 0) then {_trigger = _this select 0};
if (_count > 1) then {_randomBuildings = _this select 1};
if (_count > 2) then {_randomDoors = _this select 2};
if (_count > 3) then {_classes = _this select 3};

{    if (random 100 <= _randomBuildings) then {
        _doors = getNumber (configFile >> "CFGVehicles" >> typeOf _x >> "numberOfDoors");
        for "_i" from 1 to _doors do {
            if (random 100 <= _randomDoors) then {
                [_i,_x,_forEachIndex] spawn {

                    private ["_door","_building","_pos","_doorpos","_index","_dummy","_damage"];

                    _door = _this select 0;
                    _building = _this select 1;

                    _pos = _building selectionPosition (format ["Door_%1_trigger", _door]);
                    _doorpos = _building modelToWorld _pos;

                    //_index = _this select 2;
                    //_doormark = createMarker [str _index + "_" + str _door, _doorpos];
                    //_doormark setMarkerType "hd_dot";

                    _dummy = "Land_MetalBarrel_F" createvehicle [0,0,0];
                    _dummy enableSimulation false;
                    _dummy setPos [_doorpos select 0, _doorpos select 1, (_doorpos select 2)-1];
                    _dummy hideObjectGlobal true;

                    _damage = switch (typeOf _building) do {
                        case "Land_City_Gate_F":     {0.006};
                        case "Land_Stone_Gate_F":     {0.1};
                        case "Land_Medevac_house_V1_F";
                        case "Land_Cargo_House_V2_F";
                        case "Land_Cargo_House_V3_F";
                        case "Land_Cargo_House_V1_F":    {0.11};
                        default             {0.025};
                    };

                    _building animate [ format["door_%1_rot",_door], 0];
                    _building setVariable[format["bis_disabled_Door_%1",_door],1,true];
                    while {damage _dummy < _damage} do {
                        if (_building animationPhase format["door_%1_rot",_door] > 0) then {
                            _building animate [ format["door_%1_rot",_door], 0];
                        };
                        sleep 0.1;
                    };
                    _building setVariable[format["bis_disabled_Door_%1",_door],0,true];
                    _building animate [ format["door_%1_rot",_door], 1];

                    deleteVehicle _dummy;
                };
            };
        };
    };
} forEach nearestObjects [_trigger,[_classes],triggerArea _trigger select 0];
 

 

Share this post


Link to post
Share on other sites
1 hour ago, WarhammerActual said:

I hought of that , however I can not find in the script where its specifically calling for the claymore... Unless I'm totally blind 

  Reveal hidden contents

/*
Breaching-Doors-script for ArmA3-Buildings by LuzifR (v0.07)
------------------------------------------------------------
Squadpage: http://steamcommunity.com/groups/cz75-squad

Description:
    This script locks doors or gates of ArmA3-Buildings in a trigger area and makes it possible to force open them with a Claymore charge.

Execution from a trigger:
    Size            - Script is running for every building or gates in the trigger area.
    Condition        - true
    On Activation        - 0=[thisTrigger] execVM "cz75_breachingdoors.sqf";

Parameter:
    Trigger name        - Variable Name of the trigger (default: thisTrigger)
    Buildings percentage    - How much percent (0-100) of buildings with closed doors (default if empty: 100)
    Doors percentage    - How much percent (0-100) of closed doors (default if empty: 100)
    Building class        - Which classes of buildings have closed doors (default if empty: "Building")

Examples:
    - In this case all doors of all buildings or gates in the triggerarea are closed:
        0=[thisTrigger] execVM "cz75_breachingdoors.sqf";
        (equal to: 0=[thisTrigger,100,100,"Building"] execVM "cz75_breachingdoors.sqf";)

    - In this case in 20% of all buildings or gates in the triggerarea all doors in this building are closed:
        0=[thisTrigger,20,100] execVM "cz75_breachingdoors.sqf";
    
    - In this case 50% of the doors of all Military-Cargo-HQ buildings in the triggerarea are closed:
        0=[thisTrigger,100,50,"Land_Cargo_HQ_V1_F"] execVM "cz75_breachingdoors.sqf";
*/

if (!isServer) exitWith {};

sleep 2; // To make sure the script works with placed buildings

private ["_trigger","_randomBuildings","_randomDoors","_classes","_count","_doors","_i"];

// Defaults
_trigger = _this select 0;
_randomBuildings = 100;
_randomDoors = 100;
_classes = "Building";

_count = count _this;
if (_count > 0) then {_trigger = _this select 0};
if (_count > 1) then {_randomBuildings = _this select 1};
if (_count > 2) then {_randomDoors = _this select 2};
if (_count > 3) then {_classes = _this select 3};

{    if (random 100 <= _randomBuildings) then {
        _doors = getNumber (configFile >> "CFGVehicles" >> typeOf _x >> "numberOfDoors");
        for "_i" from 1 to _doors do {
            if (random 100 <= _randomDoors) then {
                [_i,_x,_forEachIndex] spawn {

                    private ["_door","_building","_pos","_doorpos","_index","_dummy","_damage"];

                    _door = _this select 0;
                    _building = _this select 1;

                    _pos = _building selectionPosition (format ["Door_%1_trigger", _door]);
                    _doorpos = _building modelToWorld _pos;

                    //_index = _this select 2;
                    //_doormark = createMarker [str _index + "_" + str _door, _doorpos];
                    //_doormark setMarkerType "hd_dot";

                    _dummy = "Land_MetalBarrel_F" createvehicle [0,0,0];
                    _dummy enableSimulation false;
                    _dummy setPos [_doorpos select 0, _doorpos select 1, (_doorpos select 2)-1];
                    _dummy hideObjectGlobal true;

                    _damage = switch (typeOf _building) do {
                        case "Land_City_Gate_F":     {0.006};
                        case "Land_Stone_Gate_F":     {0.1};
                        case "Land_Medevac_house_V1_F";
                        case "Land_Cargo_House_V2_F";
                        case "Land_Cargo_House_V3_F";
                        case "Land_Cargo_House_V1_F":    {0.11};
                        default             {0.025};
                    };

                    _building animate [ format["door_%1_rot",_door], 0];
                    _building setVariable[format["bis_disabled_Door_%1",_door],1,true];
                    while {damage _dummy < _damage} do {
                        if (_building animationPhase format["door_%1_rot",_door] > 0) then {
                            _building animate [ format["door_%1_rot",_door], 0];
                        };
                        sleep 0.1;
                    };
                    _building setVariable[format["bis_disabled_Door_%1",_door],0,true];
                    _building animate [ format["door_%1_rot",_door], 1];

                    deleteVehicle _dummy;
                };
            };
        };
    };
} forEach nearestObjects [_trigger,[_classes],triggerArea _trigger select 0];
 

 

line 361?

Share this post


Link to post
Share on other sites
4 hours ago, gokitty1199 said:

line 361?

Using notepad ++ I'm seeing this script has 101 lines. May I ask where are you getting line 361 from ?

 

Share this post


Link to post
Share on other sites
12 minutes ago, WarhammerActual said:

Using notepad ++ I'm seeing this script has 101 lines. May I ask where are you getting line 361 from ?

 

i opened the .pbo in notepad++ and got 570 lines, downloaded from the middle link

Share this post


Link to post
Share on other sites
3 minutes ago, gokitty1199 said:

i opened the .pbo in notepad++ and got 570 lines, downloaded from the middle link

thats because you are looking at the mission.sqm NOT cz75_breachingdoors.sqf . Changing the item class in the mission.sqm will do nothing to change how its called in the sqf

Share this post


Link to post
Share on other sites
Just now, WarhammerActual said:

thats because you are looking at the mission.sqm NOT cz75_breachingdoors.sqf . Changing the item class in the mission.sqm will do nothing to change how its called in the sqf

i forgot to unpack the pbo, sorry it was 11pm when i posted and ive made 10 tutorials in the past 6 hours so im braindead currently

Share this post


Link to post
Share on other sites
14 hours ago, WarhammerActual said:

I hought of that , however I can not find in the script where its specifically calling for the claymore... Unless I'm totally blind 

I was looking for the same line...but like you stated, there's not.

Demo charges are more realistic, but too powerful to breach doors. Even Claymore sometimes cripple the buildings and make impossible to breach interior doors without flattening the house. Would be perfect if the script calls for a demo-charge with a variable amount of damage.

 

Share this post


Link to post
Share on other sites
On 5/18/2018 at 10:53 AM, zagor64bz said:

Would be perfect if the script calls for a demo-charge with a variable amount of damage.

 

EXACTLY

Share this post


Link to post
Share on other sites

Okay, I might just be retarded, but what do I do with the PBO? Didn't I need an SQF file to put in my mission folder?

Looks really cool and would love to use it for an upcoming cinematic.

Thanks!

Share this post


Link to post
Share on other sites
13 hours ago, Alfred79 said:

Okay, I might just be retarded, but what do I do with the PBO? Didn't I need an SQF file to put in my mission folder?

Looks really cool and would love to use it for an upcoming cinematic.

Thanks!

extract the .pbo with pbo manager

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

×