Jump to content

[RELEASE] Attach Explosives


Darth_Rogue

Recommended Posts

Attach Explosives

 

 

 

(Please forgive my building noobishness.  I don't play much.)

 

 

I've been holding onto this one for a while, but after seeing all the whining and complaining here on the forums about not being able to breach bases without insane amounts of explosives, I've decided to release this. This is not my original work, but it has been modified by second_coming and myself to work for Epoch.

 

The problem with explosives currently is that it takes way too many of them to do any real damage to structures. The reason is that with Arma, when you place an explosives charge it is placed on the ground in front of the object. When the explosive goes off most of the explosive force is driven into the ground. Damage of the objects nearby is limited to splash damage only, which is only a fraction of the damage that can potentially be dealt by the explosive.

 

So, to solve this, you can use this script to attach the explosive charge directly to the object you are wanting to demolish, thereby greatly reducing the amount of explosives it takes to accomplish the desired effect. With the traditional placement method of setting a charge on the ground in front of an object, it can take up to 30 charges to breach a door. By attaching the explosive directly to the door, we can now have the same damage,  but through using only 3 or 4 charges.

 

The explosives can be attached to any object you specify within the script. You can set it to work with only Epoch buildables, or you can also include vehicles, as I have done in the download. This makes for some interesting scenarios where people can set traps for others by attaching a charge to their vehicles and then detonating them remotely to either create a distraction or also to destroy a vehicle with a target player inside. The possibilities are endless and can provide for some exciting gameplay, in addition to making base raiding more realistic and fun.

 

Installation: See included text file

 

 

 

 

Download

 

Some things to note:  I don't know how well this will work with the stock Anti-Hack since it uses addActions.  I've heard conflicting reports about how those are handled with the stock AH.  There is a new server files version coming which should fix this, but until then, your mileage may vary.  I also don't know that the stock AH will allow the damage to occur properly on player built items.  If you are using Infistar, please ensure that the indestructible option is turned off, otherwise this script will have no effect on buildable objects.  You should also disable 'Check Actions Plr ','Remove Actions Plr','Remove Actions Objs','revert_allowDamage', 'HandleDamage check', and Revert HandleDamage' to make sure those don't interfere as well, although you likely already have those turned off to accommodate other mods already.

Link to comment
Share on other sites

Timer bug fixed.  EtV.sqf line ~63 area should look like this

        //_illogic = group server createUnit ["logic", Position _explosive, [], 0, "FORM"];  //comment out this one
	_grp = createGroup east;  //add this line
	_illogic = _grp createUnit ["logic", Position _explosive, [], 0, "FORM"];  //add this line
	[_illogic] join _grp; //add this line

As a result of the code change, add this new BE filter to scripts.txt, line 35 (or whatever line your createUnit section resides)

!"_illogic = _grp createUnit ["logic", Position _explo""

Files on GitHub have been updated accordingly.  

Link to comment
Share on other sites

Currently it works with C4 charges.  You can add satchels to it if you want but that will require some additional code, but not much.  I thought about it and figured that attaching a satchel to an object wasn't very realistic, whereas with a demo charge, that's pretty much what they're designed for.

 

To use the attach feature, you simply need to have a demo charge in your inventory, walk up to the vehicle or door that you want to attach it to and you will get a scroll option to attach it.  Once it's attached you can set a timer in 30 second increments or detonate it whenever you wish.  

 

One caveat with this is that the detonate feature has unlimited range.  So you could, in theory, set a demo charge in Elektro and detonate it as you stand in the middle of Berenzino.  I'm sure there's a way to "fix" this and create a range restriction, but I haven't worked out precisely how to do that yet.    

Link to comment
Share on other sites

am I missing something?  I tried putting it in my mission folder/epoch hive addons /epoch hive etc and get in the server etv.sqf not found pop up on screen doesnt matter where I put it.

 

 

It goes in the mission file.  Just make sure the path in your init matches where the EtV file actually resides.

Link to comment
Share on other sites

Just a tip regarding the use of createGroup in the script: For logic units it's a good idea to use the "logic" side. Using player sides like east or west can cause issues if the 144 groups/side limit is exceeded, so using those sides should be avoided like the plague.

 

 

Face, if I set the side to logic I get this error:

20:59:31 Error in expression <t = _this select 1;

_grp = createGroup logic;
_illogic = _grp createUnit ["logi>
20:59:31   Error position: <logic;
_illogic = _grp createUnit ["logi>
20:59:31   Error Undefined variable in expression: logic
20:59:31 File mpmissions\__CUR_MP.Bornholm\addons\EtV\EtV.sqf, line 63

This is the code I'm testing.

EtV_TimedCharge =
{
	_explosive = _this select 0;
	_unit = _this select 1;
	//_illogic = group server createUnit ["logic", Position _explosive, [], 0, "FORM"];
	_grp = createGroup logic;
	_illogic = _grp createUnit ["logic", Position _explosive, [], 0, "FORM"];
	[_illogic] join _grp;
	_illogic attachTo [_explosive];
	while {alive _explosive} do

I got the same error with the code that's commented out, which was the initial cause of the timer function not working.  

Link to comment
Share on other sites

Anyone have any interference from other mods that use addactions or cmdmenus? I cannot get these addaction options to show up for the life of me. I can see in the rpt that it is loading the script up, but no matter how i arrange how it's called and what order it's called from (as i have a few scripts that call with {!isdedicated and hasinterface} ), the damn options will not show. 

 

 

frustrating as i really wanted to utilize this addon. <_<

Link to comment
Share on other sites

Yup, I was certain when I first applied it. What's annoying is I don't get any errors as to what is blocking the options from showing up.

 

I do however run the if {!isDedicated and hasinterface} line calls from my onPlayerRespawn.sqf, but i have tried moving just the EtV call line over to my init with a new {!isDedicated and hasinterface} and I still can't get the options to show. I might have to start disabling my 50 scripts one at a time until i figure out which is blocking it. <_<

 

annoying.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...