Jump to content
LuzifR

CZ75 Breaching Doors Script

Recommended Posts

E4782DFA05D7F6DFB07F61E60D4CD244A312090D

Title
CZ75 Breaching Doors Script

Author
LuzifR

Short 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.

Version
0.08

Required Addons
-

Download
globalheader_logo.png tobxs.png news_donwload_oa_4.png

Installation
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";

Included files
cz75_breaching-doors-script.Altis.pbo

Change log
v0.08:
fixed because of arma-updates

Features
Breaching Doors
Parameters buildings percentage, doors percentage and building class
Works on dedicated servers
ACE3 compatibility
Works only with ArmA3 buildings at this time

Media

 



Forums Topic
BI Forums

Credits & Thanks
Script made by LuzifR
Tested by: M.Blackwell, Spiderman and LuzifR
TS3-, FTP- and ARMA-Server by The Oldboys

 

cz75_128.png

  • Like 9

Share this post


Link to post
Share on other sites

Hmmm very cool idea for compounds etc...

Will give it a try!

Share this post


Link to post
Share on other sites

Nice work.

One thing strikes me as a bit weird though. From the looks of it, you're using the overal damage value of the building to breach them doors.
 

You could use a "HitPart" eventhandler instead, that would allow you to handle breaching for each door individually.

 
 
 
I've made something similar a while ago, feel free to check it out and/or incorporate parts of it for your own purpose. I don't mind, never bothered releasing it anyway.

// [ cursorTarget, "eed_initDoors", true, true] spawn BIS_fnc_MP;
eed_initDoors = {
	private ["_building","_lockchance","_class","_num","_i","_var","_anim"];
	_building = _this select 0;
	_lockchance = _this select 1;
	if (isNil "_lockchance") then { _lockchance = 30; };

	_class = configFile >> "CfgVehicles" >> typeOf _building;
	_num = getNumber (_class >> "numberofdoors");

	if (isServer) then {
		for "_i" from 1 to _num do {
			if (random 100 < _lockchance) then {
				_var = format ["bis_disabled_Door_%1", _i];
				_anim = format ["Door_%1_rot", _i];
				_building animate[_anim, 0];
				_building setVariable[_var,1,true];
			};
		};
	};

	_building addEventHandler["hitPart","_this call eed_breaching;"];
};

eed_lockDoors = {
	private ["_building","_class","_num","_lockchance","_var","_anim"];
	_building = [_this, 0, objNull, [ objNull ]] call BIS_fnc_param;
	if ( isNull _building ) exitWith { false };


	_class = configFile >> "CfgVehicles" >> typeOf _building;
	_num = getNumber (_class >> "numberofdoors");

	for "_i" from 1 to _num do {
		if (random 100 < _lockchance) then {
			_var = format ["bis_disabled_Door_%1", _i];
			_anim = format ["Door_%1_rot", _i];
			_building animate[_anim, 0];
			_building setVariable[_var,1,true];
		};
	};

	true
};

eed_breaching = {
	private ["_z","_target","_shooter","_bullet","_position","_velocity","_selection","_ammo","_direction","_radius","_surface","_direct","_substr","_power","_lim1","_lim2","_rnd","_diff","_anim","_var","_phase"];
	_z = _this select 0;
	_target = _z select 0;
	_shooter = _z select 1;
	_bullet = _z select 2;
	_position = _z select 3;
	_velocity = _z select 4;
	_selection = (_z select 5) select 0;
	_ammo = _z select 6;
	_direction = _z select 7;
	_radius = _z select 8;
	_surface = _z select 9;
	_direct = _z select 10;

	_substr = toArray(_selection);
	_substr resize 5;
	_substr = toLower (toString _substr);
	if (_substr == "door_") then {
		_power = _ammo select 0;

		if (_direct) then {
			_lim1 = 5;
			_lim2 = 25;
		} else {
			_lim1 = 7;
			_lim2 = 11;
		};
		_rnd = random (_lim2 - _lim1);
		_diff = (_power + _rnd) - _lim2;

		if ( _diff >= 0 ) then {
			_anim = format ["%1_rot", _selection];
			_var = format ["bis_disabled_%1", _selection];
			_phase = _target animationPhase _anim;
			if ( (!_direct && _diff > 2) || (_direct && _diff > 30) ) then {
				_target animate[_anim, 1];
				_target setVariable[_var,1,true];
			} else {
				if (_phase < 1) then {
					_target animate[_anim, _phase + 0.1];
					_target setVariable[_var,0,true];
				};
			};
		};
	};
};


Notable differences:

- Doors handled individually

- Breaching can be done with anything that is powerful enough (shooting the "lock" works)

- Powerful blasts slam the door open, less powerful attacks only open it gradually

  • Like 1

Share this post


Link to post
Share on other sites

COOL!!!  Now..if it could work on A2 buildings too THAT would be perfect!!

 

Thanks anyway man..GOOD JOB!!

Share this post


Link to post
Share on other sites

Nice work.

One thing strikes me as a bit weird though. From the looks of it, you're using the overal damage value of the building to breach them doors.

 

You could use a "HitPart" eventhandler instead, that would allow you to handle breaching for each door individually.

...

Hi Tajin. With my script it's possible to handle breaching for each door individually because i don't use the overall damage value of the building. And breaching can be done with anything that is powerful enough (for example 2-3 handgrenades). But thank you for your post and I am glad to see your script. I'll check it and maybe i can improve something. Thanks man.

  • Like 1

Share this post


Link to post
Share on other sites

Had a go at it and remembered how fun it is playing with explosives lol.

If I can ask... what is the limitation with say cup terrains... is it a door configuration problem... I have a mission I would like to add it to on takistan

Share this post


Link to post
Share on other sites

COOL!!! Now..if it could work on A2 buildings too THAT would be perfect!!

Thanks anyway man..GOOD JOB!!

Had a go at it and remembered how fun it is playing with explosives lol.

If I can ask... what is the limitation with say cup terrains... is it a door configuration problem... I have a mission I would like to add it to on takistan

Problem is that the classnames of ArmA2-door-animations are more different and it takes time to write a script which checks the classname of buildings and assign them their animation-classnames. But I plan to do it if I have time.
  • Thanks 1

Share this post


Link to post
Share on other sites

COOL!!!  Now..if it could work on A2 buildings too THAT would be perfect!!

 

Thanks anyway man..GOOD JOB!!

 

Problem is that the classnames of ArmA2-door-animations are more different and it takes time to write a script which checks the classname of buildings and assign them their animation-classnames. But I plan to do it if I have time.

 

While A2 would be nice, I already have enough trouble using all the A3-only asset maps that are out there now. I'll be busy enough for a long time! :D (This in no way criticizes people with existing missions on A2-asset maps or map-specific mission designs; I'm pretty map agnostic since I just want scenario problem-solving and stuff to shoot up / blow up)

This is very cool, as it opens up for me a mission possibility for a hostile VIP barricaded with his bodyguards in a safehouse. Enter and apprehend, etc. I had previously gotten as far as the basic capture, but now it can be more realistic than just sauntering into the open compound in Pyrgos and mowing down all these fools who left their doors unlocked. :D

For those curious, this is a (probably incomplete, also possibly incorrect) map of A3-only map assets. I have not had time to personally create missions / play on all of these for testing/confirmation of A3 assets (notes in parentheses if I have run missions on them):

Bozcaada

Imrali

Gorgona

CossacCape

Wake Island

Nabbi Islands

Einfelde Nord

Mistica

Ural

Angel Island

Xcam (very dense, complex terrain)

Porquerolles (nice, lots of complex terrain)

These maps appear to be still in beta (some active, some not):

Pianosa (small, well put together)

Alaska

Koplic

Linosa

Isle of Scilly

Lost Coast

Tilos

I also have:

Waziristan

Sulaimany City Kurdistan

Al Jak

Hindu Kush

Kandahar

Wardak

On this reference list but I think I am wrong. Certainly many of these last ones use JBAD buildings which probably don't have the same door anim classnames either.

And many of the newer hybrid maps use both A3 and A2 assets, so you can probably find an A3 compatible building or several in an area suitable for a raid with breaching. e.g. Sugar Lake.

Share this post


Link to post
Share on other sites

Hi Tajin. With my script it's possible to handle breaching for each door individually because i don't use the overall damage value of the building.

 

My bad, I somehow missed the part where you spawn the invisible barrels to detect damage.

Anyway, hitPart is still a much better solution, be sure to give it a try. :D

  • Like 1

Share this post


Link to post
Share on other sites

...

Certainly many of these last ones use JBAD buildings which probably don't have the same door anim classnames either.

And many of the newer hybrid maps use both A3 and A2 assets, so you can probably find an A3 compatible building or several in an area suitable for a raid with breaching. e.g. Sugar Lake.

It would be nice if the script would work with most popular addon buildings. But first I focus on arma2 buildings I think.

My bad, I somehow missed the part where you spawn the invisible barrels to detect damage.

Anyway, hitPart is still a much better solution, be sure to give it a try. :D

I had a look at it and think too its a better solution and more "elegant" than using invisible barrels. You have more possibilities with "hitpart" (for example ammo etc.) and will consider it in my next update. thanks

Share this post


Link to post
Share on other sites

It would be nice if the script would work with most popular addon buildings. But first I focus on arma2 buildings I think.

I agree and support your choice, of course. What I meant was that my list had some maps w JBAD buildings to let mission makers know there would be buildings unusable for now on those specific maps.

I've been having a blast (literally) searching for random locked doors and clearing houses. Dropping grenades at the door with ACE "drop grenade" throw works well, but you have to hustle for cover. :P Good luck and keep having fun creating this script!

Share this post


Link to post
Share on other sites

Nice script! I like the fact that the door shakes when it's locked and pops open when it's breached.

Good job!

Share this post


Link to post
Share on other sites

Fantastic script - really really good and works brilliantly - i've only just started putting missions together so my scripting is very limited at the minute - Is there any way to modify this script so that a shotgun can be used to breach? I'm trying to come up with some new ways of conducting CQB with my team and am trying to move away from the claymore entry.

 

Any help would be greatly appreciated

  • Like 1

Share this post


Link to post
Share on other sites

It should works as you giving the damage to invisible metal barrel which is exactly on door position.

Share this post


Link to post
Share on other sites

Hi, how to activate this script only in the presence of civilians?

and if I want active it for a period of 15 minutes and after, this script will turn off in automatic?

 

(Translated with GoogleTranslate)

Share this post


Link to post
Share on other sites

The file says v 0.07 at the top, not sure if you just didn't change it to 0.08 or the file didn't get updated. Just figured I'd let you know. Thanks for a great little script!

Share this post


Link to post
Share on other sites

Is this a script or an Addon?  I open the file and it has @CZ75 Breaching Doors Script but no .sqf file?

 

Any help is appreciated :)

 

 

 

Share this post


Link to post
Share on other sites
On 24.8.2017 at 11:04 PM, 4-325Ranger said:

The file says v 0.07 at the top, not sure if you just didn't change it to 0.08 or the file didn't get updated. Just figured I'd let you know. Thanks for a great little script!

the armaholic download includes only the bin-file at this time. but its up to date. that steam-link and the tob-filecenter-link should be the last version too.

 

4 hours ago, reaper lok said:

Is this a script or an Addon?  I open the file and it has @CZ75 Breaching Doors Script but no .sqf file?

 

Any help is appreciated :)

the pbo-file contains the script

  • Like 1

Share this post


Link to post
Share on other sites
On 25.8.2017 at 11:26 PM, LuzifR said:

the armaholic download includes only the bin-file at this time.

armaholic link is up to date

Share this post


Link to post
Share on other sites
On 1/5/2017 at 6:34 AM, Hydrol said:

I'm trying to come up with some new ways of conducting CQB with my team and am trying to move away from the claymore entry.

 

A claymore is an interesting way to breach! Do you have plans to open breaching up to other forms of explosive?

Share this post


Link to post
Share on other sites

Another similar script I found allowed the locked doors to also be opened by ...

  • a Toolkit to lockpick (with a timer) 
  • some weapons like shotguns (suggestion: could be opened based on,  if possible, ammo-class hit, on explosion classes or on penetration level). 

The other script in question did not work though, so I am looking at yours now :P

EDIT: see my next post ...

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

×