Jump to content
Sign in to follow this  
rejenorst

Default shell name of a D30 insurgent.

Recommended Posts

Im looking for the shell name of the round the D30 arty fires AFTER its been fired.

Im working on converting an arma script of mine but the original doesn't seem to quite work. The original round for arma was the sh_122mm_he I think

(I forgot how its written but it works when I spawn the shell. Yet in the explosions it doesn't look the same as the d30 default shell being fired. Which led me to believe it may not be the same since in Arma2 there are multiple artillery magazine names.)

So basically am looking for the name of the round from a D30 after it leaves the barrel as I am using eventhandlers to attach markers on the rounds.

Thank you.

---------- Post added at 10:40 PM ---------- Previous post was at 10:32 PM ----------

Actually found a work around I think with this:

gun addEventHandler ["fired",{deleteVehicle (nearestObject [_this select 0,_this select 4])}]

But I think the shell name is the same so the problem may lie elsewhere.

Share this post


Link to post
Share on other sites

gday Rejenorst :bounce3:

cfgVehicles

class D30_base: StaticCannon
{
	class Turrets: Turrets
	{
		class MainTurret: MainTurret
		{
			weapons[] =
			{
				"D30"
			};
			magazines[] =
			{
				"ARTY_30Rnd_122mmHE_D30"
			};

cfgWeapons

class D30: CannonCore
{
	magazines[] =
	{
		"30Rnd_122mmHE_D30",
		"ARTY_30Rnd_122mmHE_D30",
		"ARTY_30Rnd_122mmWP_D30",
		"ARTY_30Rnd_122mmSADARM_D30",
		"ARTY_30Rnd_122mmLASER_D30",
		"ARTY_30Rnd_122mmSMOKE_D30",
		"ARTY_30Rnd_122mmILLUM_D30"
	};

cfgMagazines

{
	scope = 2;
	displayName = "XM31 HE";
	ammo = "ARTY_R_227mm_HE_Rocket";
	initSpeed = 75;
	maxLeadSpeed = 200;
	count = 12;
	nameSound = "rockets";
	ARTY_Ballistics = "\ca\modules\arty\data\tables\m270\xm31_ballistics.sqf";
};
class ARTY_30Rnd_122mmHE_D30: VehicleMagazine
{
	ammo = "ARTY_Sh_122_HE";

Try the allInOne config. :)

ps: you can use diag_log to dump to rpt.

Share this post


Link to post
Share on other sites

An "fired" eventhandler also always returns the name of the ammunition that was fired.

_unit = _this select 0;
_weapon = _this select 1;
_muzzle = _this select 2;
_mode = _this select 3;
_ammo = _this select 4;

Therefor an easy way to find the bullet would be this:

_shot = nearestObject [_unit, _ammo];

Edit.:

Ok I see you've already used this.

Well about the explosion, the velocity of the projectile can play a role here.

Atleast for normal bullets it does.

Edited by Tajin

Share this post


Link to post
Share on other sites

Ah nice stuff there! Thanks guys!

I got my artillery script working and did some adjustments etc.

its a very basic type script of a self correcting artillery. I coded it for Arma1 and it basically uses a magic number depending on target range and then self corrects itself depending on where the shell lands. Usually I can kill the target with a D30 in anywhere from 1-5 shots depending terrain and range.

Did it for a bit of fun to simulate inexperienced crews and as a work around for my lack of knowledge in ballistics.

Share this post


Link to post
Share on other sites

Hmm I've done ballistic calculations in garrys mod to have an selfmade cannon fire at a specified point. Never tried it in arma though. *ponders*

Glad you got it working.

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  

×