Jump to content
Sign in to follow this  
Zipper5

Explosives broken again? (1.54.74123)

Recommended Posts

I've been making a mission for my campaign in which you have to utilize an artillery strike to take out a Takistani T72 before it's safe for you and other elements to attack a town. Originally I used the Simple Support Module to accomplish this, but that was far too... Simplistic. So I decided to create my own artillery script (see below) to accomplish it better and allow me to have voice acting for it. Unfortunately, it would appear the explosives might be broken again, or at least for some types.

I'm using the 125mm HE shell and even with 4 of them (I did that when I realized 1 wasn't having any effect) spawning in the same place they don't even seem to hurt infantry, even if the artillery hits one directly. I even tried using a GBU and it didn't do any damage. Despite the randomness of where they land they do fall within a radius many times that I would usually expect to destroy the T72 if the player guides it properly. I can't see any errors with the script itself, and none of the units are allowDamage false'd, but if anyone has an ideas please let me know. If anyone else manages to reproduce the same thing I'll create a ticket for it on the CIT if no one else has by then.

This is all done with the latest beta patch, 1.54.74123, and only vanilla Combined Operations.

Command to call the artillery:

hint "Use your map to guide the artillery strike.";

onMapSingleClick {[_pos] execVM "arty.sqf"};

Artillery script:

_artyPos = _this select 0;

"arty" setMarkerPos _artyPos;
"arty" setMarkerShape "ELLIPSE";
"arty" setMarkerBrush "DiagGrid";
"arty" setMarkerSize [50,50];

_artyShells = 0;
_shell = "Sh_125_HE";

sleep 1;

aP sideRadio "requestArty";

sleep 7;

usArty1 sideRadio "confirmArty";

sleep 10;

usArty1 sideRadio "shot";

sleep 25;

usArty1 sideRadio "splash";

sleep 2;

underAttack = true;

while {_artyShells < 15} do {
_arty1 = _shell createVehicle [((_artyPos select 0) + (random 50) - (random 50)), ((_artyPos select 1) + (random 50) - (random 50)), (_artyPos select 2)];
_arty2 = _shell createVehicle position _arty1;
_arty3 = _shell createVehicle position _arty1;
_arty4 = _shell createVehicle position _arty1;

sleep (3 + (random 3));

_artyShells = _artyShells + 1;

if (_artyShells == 15) then {
	deleteMarker "arty";

	//Artillery shells damage broken? This will have to do until it's fixed...
	if (alive takT1 || (takT1C in takT1 && alive takT1C) || (takT1G in takT1 && alive takT1G) || (takT1D in takT1 && alive takT1D)) then {
		killT72 = _shell createVehicle position takT1;
		sleep 1;
		takT1 setDamage 1;
		{_x setDamage 1} forEach units (group takT1C);
	};
};
};

Share this post


Link to post
Share on other sites

I might be reading that wrong, but are the shells not starting in the air? If they are starting at an altitude of 0, their damage is moderately - severely reduced as they are detonating "in" the ground.

I had played around with createvehicled shells a bit, and a 122mm HE shell using just a position were nowhere near as devestating as one that spawned ~0.5+m in the air.

Downside is of course you will see the munition for that split second.

Share this post


Link to post
Share on other sites

How about spawning them high in the air and let them drop like their kinda supposed to? Can attach a trail to the projectile as well.

Share this post


Link to post
Share on other sites

Thanks for the suggestions, guys. Spawning them higher does seem to make them do more damage. Did BIS take the round's velocity into account or something?

Your idea of smoke trails is a great one, Carl, but I'm quite green when it comes to particle scripting. Could you perhaps point me in the right direction to achieve such an effect with the method I already have? Thanks. :o

Perhaps PM would be the best place to do this as we can consider this issue closed. :p

Share this post


Link to post
Share on other sites

Not sure what the reason is. I know it helps hitting the dirt when you hear the incoming sound though. Saved my ass many times. :p

Maybe move it to mission scripting? I don't like PM as info won't be available to others. This is what I use for my Domino mission:

Arty_Mission_Effects_Client = {
private ["_trail","_sm","_sp","_li","_to_delete","_timetolive"];
[nil, _this select 0, nil, _this select 2] spawn {
	_obj = "HeliHEmpty" createVehicleLocal (_this select 3);
	switch (_this select 1) do {
		case 1 : {sleep 7.5; if (d_debug_mode) then {hint "Arty he"}; _obj say3D (["Ari1","Ari2","Ari3","Ari4","Ari5","Ari6"] select (floor random 6));}; //he
		case 2 : {if (d_debug_mode) then {hint "Arty flare"}; _obj say3D (["Ari1","Ari2","Ari3","Ari4","Ari5","Ari6"] select (floor random 6));}; //flare
		case 3 : {if (d_debug_mode) then {hint "Arty smoke"}; _obj say3D (["Ari1","Ari2","Ari3","Ari4","Ari5","Ari6"] select (floor random 6));}; //smoke
		case 4 : {if (d_debug_mode) then {hint "Arty apicm"}; _obj say3D (["Ari1","Ari2","Ari3","Ari4","Ari5","Ari6"] select (floor random 6));}; //apicm
		case 5 : {sleep 8.5; if (d_debug_mode) then {hint "Mortar he"}; _obj say3D (["Mortar1","Mortar2","Mortar3","Mortar4"] select (floor random 4));}; //he
		case 6 : {if (d_debug_mode) then {hint "Mortar flare"}; _obj say3D (["Mortar1","Mortar2","Mortar3","Mortar4"] select (floor random 4));}; //flare
		case 7 : {if (d_debug_mode) then {hint "Mortar smoke"}; _obj say3D (["Mortar1","Mortar2","Mortar3","Mortar4"] select (floor random 4));}; //smoke
	};
	sleep 12.123;
	deleteVehicle _obj;
};
sleep 1.234;
switch (_this select 0) do {
	case 1: { //arty HE trail
		sleep 0.5;
		_trail = "#particlesource" createVehicleLocal getpos (_this select 1);
			_trail setParticleRandom [0.0, [0.3, 0.3, 0.3], [0.4, 0.4, 0.4], 1, 0.2, [0, 0, 0, 0], 0, 0];
			_trail setDropInterval 0.001;
			_trail setParticleParams [
			["\ca\Data\ParticleEffects\Universal\Universal.p3d", 16, 12, 8],
			"", "Billboard", 1, 0.7,  //change from 10 to 1 when things look good
			[0,0,0.0], [0,0,0], 
			1, 1, 0.8, 0.5, 
			[0.5, 0.5, 0.5], 
			[[0.8, 0.8, 0.8, 0.0],[0.9,0.9,0.9,0.25],[1.0, 1.0, 1.0, 0.0]], [1.125], 0.1, 0.1, "", "", (_this select 1), 0];
		_trail attachTo [(_this select 1), [0,0,0]];
		_trail;
	};
	case 2: { //arty flare smoke, not in use yet though, ref http://www.youtube.com/watch?v=Wgz2bBj14qI
		(_this select 1) say3D "FlareDeploy"; (_this select 1) say3D "FlareBurnArty";
		_timetolive = getNumber (configFile >> "CfgAmmo" >> (typeOf (_this select 1)) >> "timeToLive");
		_to_delete = [];
		_sm = "#particlesource" createVehicleLocal getpos (_this select 1);
		_sm setParticleRandom [0.5, [0, 0, 0], [0, 0, 0], 0, 0.3, [0, 0, 0, 0], 0, 0, 360];
		_sm setParticleParams [["\ca\Data\ParticleEffects\Universal\Universal", 16, 12, 8,0],
			"", "Billboard", 1, 30, [0, 0, 0],
			[0,0,0], 1, 1, 0.80, 0.5, [1.3,4],
			[[0.9,0.9,0.9,0.6], [1,1,1,0.3], [1,1,1,0]],[1],0.1,0.1,"","",_this select 1];	
		_sm setdropinterval 0.02;

		_sp = "#particlesource" createVehicleLocal getpos (_this select 1);
		_sp setParticleRandom [0.03, [0, 0, 0], [0, 0, 0], 0, 0.2, [0, 0, 0, 0], 0, 0, 360];
		_sp setParticleParams [["\ca\Data\ParticleEffects\Universal\Universal", 16, 13, 2,0],
			"", "Billboard", 1, 0.1, [0, 0, 0],
			[0,0,0], 1, 1, 0.80, 0.5, [1.5,0],
			[[1,1,1,-4], [1,1,1,-4], [1,1,1,-2],[1,1,1,0]],[1000],0.1,0.1,"","",_this select 1,360];	
		_sp setdropinterval 0.001;

// Looks awesome when already within zone, but coming in looks awful
		_li = "#lightpoint" createVehicleLocal getpos (_this select 1);
		_li setLightBrightness 1.8; //3.4;
		_li setLightAmbient[0.8, 0.6, 0.2];
		_li setLightColor[1, 0.5, 0.2];
		_li lightAttachObject [_this select 1, [0,0,0]];

		_to_delete = _to_delete + [_sm, _sp, _li];
		[_to_delete, _timetolive] spawn {
			sleep (_this select 1);
			{deleteVehicle _x} forEach (_this select 0);
		};
	};
	case 3 : { //arty smoke, no effects
	}; 
	case 4 : { //arty apicm, no effects
	};
	case 5: { //mortar HE trail
		sleep 0.5;
		_trail ="#particlesource" createVehicleLocal getpos (_this select 1);
		_trail setParticleRandom [0.0, [0.3, 0.3, 0.3], [0.4, 0.4, 0.4], 1, 0.2, [0, 0, 0, 0], 0, 0];
			_trail setDropInterval 0.001;
			_trail setParticleParams [
			["\ca\Data\ParticleEffects\Universal\Universal.p3d", 16, 12, 8],
			"", "Billboard", 1, 0.7,  //change from 10 to 1 when things look good
			[0,0,0.0], [0,0,0], 
			1, 1, 0.8, 0.5, 
			[0.5, 0.5, 0.5], 
			[[0.8, 0.8, 0.8, 0.0],[0.9,0.9,0.9,0.25],[1.0, 1.0, 1.0, 0.0]], [1.125], 0.1, 0.1, "", "", (_this select 1), 0];
		_trail attachTo [(_this select 1), [0,0,0]];
		_trail;
	};
	case 6: { //mortar flare smoke, not in use yet though, ref http://www.youtube.com/watch?v=Wgz2bBj14qI
		(_this select 1) say3D "FlareDeploy"; (_this select 1) say3D "FlareBurnArty";
		_timetolive = getNumber (configFile >> "CfgAmmo" >> (typeOf (_this select 1)) >> "timeToLive");
		_to_delete = [];
		_sm = "#particlesource" createVehicleLocal getpos (_this select 1);
		_sm setParticleRandom [0.5, [0, 0, 0], [0, 0, 0], 0, 0.3, [0, 0, 0, 0], 0, 0, 360];
		_sm setParticleParams [["\ca\Data\ParticleEffects\Universal\Universal", 16, 12, 8,0],
			"", "Billboard", 1, 30, [0, 0, 0],
			[0,0,0], 1, 1, 0.80, 0.5, [1.3,4],
			[[0.9,0.9,0.9,0.6], [1,1,1,0.3], [1,1,1,0]],[1],0.1,0.1,"","",_this select 1];	
		_sm setdropinterval 0.02;

		_sp = "#particlesource" createVehicleLocal getpos (_this select 1);
		_sp setParticleRandom [0.03, [0, 0, 0], [0, 0, 0], 0, 0.2, [0, 0, 0, 0], 0, 0, 360];
		_sp setParticleParams [["\ca\Data\ParticleEffects\Universal\Universal", 16, 13, 2,0],
			"", "Billboard", 1, 0.1, [0, 0, 0],
			[0,0,0], 1, 1, 0.80, 0.5, [1.5,0],
			[[1,1,1,-4], [1,1,1,-4], [1,1,1,-2],[1,1,1,0]],[1000],0.1,0.1,"","",_this select 1,360];	
		_sp setdropinterval 0.001;

// Looks awesome when already within zone, but coming in looks awful
		_li = "#lightpoint" createVehicleLocal getpos (_this select 1);
		_li setLightBrightness 1.0; //3.4;
		_li setLightAmbient[0.8, 0.6, 0.2];
		_li setLightColor[1, 0.5, 0.2];
		_li lightAttachObject [_this select 1, [0,0,0]];

		_to_delete = _to_delete + [_sm, _sp, _li];
		[_to_delete, _timetolive] spawn {
			sleep (_this select 1);
			{deleteVehicle _x} forEach (_this select 0);
		};
	};
	case 7 : { //mortar smoke, no effects
	}; 
};
};

Pick it apart, take what you like, do whatever you like with it. Gives a general idea on what goes on in the mission, but there are other stuff for server that is not needed here (like descent speed and effects by wind). No need for that credit stuff, I must have gotten this somewhere as well, as particles aren't my strong side either.

You can of course expand on it too, i.e. by having such (but less) effects also on GL based flares (I do), or flares with residue burn dropoffs, or rocket engine trail for rocket based flares etc (I do in other missions, but the concept "pen rocket flares" doesn't exist in A2OA, its only simulated).

The idea of using trails for artillery shells is a bit fake though. I don't think you would see a "trail", but you might see the projectile, which could be very resolution and fps based in a game. So I guess it's ok to use it. Note that I'm not using it for smoke and (fake) apicm, because those are spawned "on location" (ground and airburst) rather than dropping.

Ahh, I see script could be updated. Nevermind that timetolive thingy, it's from previous fix attempt when projectile had to be obtained the hard way (I think, lol), and failed due stress. It's obsolete now, use waitUntil {!alive _projectile} instead. This comment only affects flares though, not HE trails.

Share this post


Link to post
Share on other sites

Contrails due to interaction with humid air and gases from RAP and base-bleed systems both can leave a visible trail. So not always, nor not often, but it does happen.

Share this post


Link to post
Share on other sites

Thanks for moving this, mods. Can't believe I didn't realize I posted it there. :o

And thanks for the script, Carl. It's exactly what I needed. I'll go about getting it how I want it to be in the mission.

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  

×