Jump to content
Sign in to follow this  
ADuke

Cannot use my "Put" weapon in multiplayer.

Recommended Posts

Hi,

So there is this bug when you use the latest version of ACE2 along with the latest beta patch....

Placing a satchel charge next to certain vehicles or static objects crashes ArmA2.

I don't have the option of uninstalling either of these so I went ahead and configged my own satchel charge for use at home and with some friends online.

Everything was fine and dandy, it worked great and I was happy with it...

Until I got into multiplayer, I started seeing these things...

1. Error messages that I couldn't play my mission because I was missing MY OWN WEAPON PACK!!

2. I couldn't place my satchel charges, I had the action menu entry but I just couldn't place them.

3. ArmA2.rpt says that my "put" weapon that I made isn't listed in my config.

Here is my config, I have been configging weapons since the days of vbs1 and this particular weapon pack I have been using since arma2 was released.

First, CfgAmmo...

class CfgAmmo {
class Default;
class BulletCore;
class BulletBase;
class TimeBombCore;	// External class reference

class ad_TimeBomb : TimeBombCore {
	scope = 2;
	hit = 2400;
	indirectHit = 2200;
	indirectHitRange = 5;
	model = "\ad_weapons\ad_satchel.p3d";
	soundHit[] = {"Ca\sounds\Weapons\explosion\explosion_mega_08", 56.2341, 1, 1500};
	whistleDist = 10;
};

class ad_PipeBomb : ad_TimeBomb {
	simulation = "shotPipeBomb";
};

Next, CfgMagazines...

class CfgMagazines {
class Default;
	class CA_Magazine;

class ad_TimeBomb_mag: CA_Magazine {
	scope = 2;
	displayName = "AD's Satchel Charge";
	picture = "\ad_weapons\icons\ad_satchel.paa";
	useAction = true;
	useActionTitle = $STR_ACTION_PUTBOMB;
	type = 16;
	value = 5;
	ammo = "ad_TimeBomb";
	count = 1;
	initSpeed = 0;
	maxLeadSpeed = 0;	// max estimated speed km/h
	nameSoundWeapon = "satchelcharge";
	nameSound = "satchelcharge";
	sound[] = {"\ca\Weapons\Data\Sound\gravel_L", db-70, 1, 10};
	descriptionShort = "This is AD's Satchel Charge";
};

class ad_PipeBomb_mag: ad_TimeBomb_mag {
	scope = 2;
	displayName = "AD's Satchel Charge";
	value = 5;
	ammo = "ad_PipeBomb";
	count = 1;
	initSpeed = 0;
	maxLeadSpeed = 0;	// max estimated speed km/h
	nameSoundWeapon = "satchelcharge";
	nameSound = "satchelcharge";
	useAction = true;
	useActionTitle = $STR_ACTION_PUTBOMB;
	sound[] = {"\ca\Weapons\Data\Sound\gravel_L", db-70, 1, 10};
	descriptionShort = "This is AD's Satchel Charge";
};

and finally, CfgWeapons

class ad_Put: Put {
	scope = 2;
	value = 20;
	type = VSoft;
	displayName = $STR_DN_PUT;
	canDrop = false;
	muzzles[] = {"ad_TimeBombMuzzle", "ad_PipeBombMuzzle", "ad_MineMuzzle", "ad_MineEMuzzle"};

	class ad_PutMuzzle : Default {
		sound[] = {"", db-70, 1};
		reloadSound[] = {"", 0.000316228, 1};
		enableAttack = false;
		optics = false;
		showEmpty = 0;
		canLock = LockNo;
		primary = 10;
		minRange = 0;
		minRangeProbab = 0.1;
		midRange = 3;
		midRangeProbab = 0.9;
		maxRange = 15;
		maxRangeProbab = 0.04;
	};

	class ad_TimeBombMuzzle : ad_PutMuzzle {
		displayName = $STR_DN_TIME_BOMB;
		magazines[] = {"ad_TimeBomb_mag"};
		enableAttack = true;
	};

	class ad_PipeBombMuzzle : ad_PutMuzzle {
		displayName = $STR_DN_PIPE_BOMB;
		magazines[] = {"ad_PipeBomb_mag"};
		enableAttack = true;
	};

	class ad_MineMuzzle : ad_PutMuzzle {
		displayName = $STR_DN_MINE;
		magazines[] = {"Mine"};
	};

	class ad_MineEMuzzle : ad_PutMuzzle {
		displayName = $STR_DN_MINE;
		magazines[] = {"MineE"};
	};
};

Can anyone help me out and tell me what is wrong?

Thanks,

-AD

Share this post


Link to post
Share on other sites

I guess that's the old problem with custom 'put' and 'throw' weapons.

Try my grenade bug fix posted here:

http://forums.bistudio.com/showpost.php?p=1653303&postcount=1012

Just replace any references to "Throw" with "Put" and "P85_Throw" with "ad_Put" in the script.

That script is more a workaround than a fix. I don't know why custom throw/put weapons don't work :(

Cheers,

D.

Share this post


Link to post
Share on other sites
I guess that's the old problem with custom 'put' and 'throw' weapons.

Try my grenade bug fix posted here:

http://forums.bistudio.com/showpost.php?p=1653303&postcount=1012

Just replace any references to "Throw" with "Put" and "P85_Throw" with "ad_Put" in the script.

That script is more a workaround than a fix. I don't know why custom throw/put weapons don't work :(

Cheers,

D.

Thanks,

Would this work on a unit if it was executed in the unit's config via the "init" eventhandler?

Share this post


Link to post
Share on other sites

This has been an issue since OFP. Custom throw and put weapons used in a units config will not be added in MP for reasons still unknown (and instead replaces them with the default ones). It might be related to fact that removeAllWeapons ignores these types of weapons. Fortunately though, using addWeapon after a slight delay seemed to be a perfectly working solution.

I'm suprised this is still an issue in ArmA 2 though. It's really not too serious since a simple init eventhandler will take care of it:

init = '(_this select 0) spawn {sleep 0.1; _this addWeapon "MyPutWeapon"}';

Share this post


Link to post
Share on other sites
This has been an issue since OFP. Custom throw and put weapons used in a units config will not be added in MP for reasons still unknown (and instead replaces them with the default ones). It might be related to fact that removeAllWeapons ignores these types of weapons. Fortunately though, using addWeapon after a slight delay seemed to be a perfectly working solution.

I'm suprised this is still an issue in ArmA 2 though. It's really not too serious since a simple init eventhandler will take care of it:

init = '(_this select 0) spawn {sleep 0.1; _this addWeapon "MyPutWeapon"}';

OK, how EXACTLY do I execute that in my init's config, because this isn't working...

	class EventHandlers {
		init = "'(_this select 0) spawn {sleep 0.1; _this addWeapon ""ad_put""}'";
	};

I have tried different iterations of that in a mission init too and nothing works, I know the quotation marks have to be correct.

Every time I try to write an init eventhandler for these units nothing works.

Share this post


Link to post
Share on other sites

	class EventHandlers {
		init = "(_this select 0) spawn {sleep 0.1; _this addWeapon ""ad_put""}";
	};

You had 1 too many set of quotations.

Share this post


Link to post
Share on other sites

I have even tried this...

class EventHandlers {
init = "[_this select 0] execVM ""\ad_soldiers\scripts\put_fix.sqf""";
};

put_fix.sqf...

_unit = _this select 0; 

[]spawn
{

while {!alive _unit} do
{
sleep 0.1; 
_unit addWeapon "ad_put";
}
};

	class EventHandlers {
		init = "(_this select 0) spawn {sleep 0.1; _this addWeapon ""ad_put""}";
	};

You had 1 too many set of quotations.

Oh, thanks, I will try that

---------- Post added at 05:56 PM ---------- Previous post was at 05:46 PM ----------

BEAUTIFUL!!

It works now, thanks for all of your help Big Dawg!!

The next bug that I have to tackle is the error message at the start of any mission that says my weapons have been deleted.

Share this post


Link to post
Share on other sites
The next bug that I have to tackle is the error message at the start of any mission that says my weapons have been deleted.

Hmm. Could you elaborate on that? That doesn't sound like any common error I've heard of.

Share this post


Link to post
Share on other sites
I guess he has to add his weapon classnames to the weapons array in cfgPatches.

Oh, that sounds right. I totally forgot that they changed the message to say something like "dependent on content that has been deleted", while in OFP it used to just report the missing CfgPatch names. Shows how long I've been out of the game. :p

Share this post


Link to post
Share on other sites
I guess he has to add his weapon classnames to the weapons array in cfgPatches.

Ya, that sounds about right, I'll do that (loooong list of weapons) and let you know if it was fixed.

Thanks again to all those who helped.

-AD

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  

×