My goal is to add two modes to the Javelin via config. The two modes are Top Attack and Direct Attack. These are selectable just like changing from Semi-Automatic to Full Automatic modes for a rifle using the F key.
My problem when I do this, it creates duplicate weapons on the Action Menu when you place the weapon in your inventory.
Expectations:
Like most AT weapons in your inventory, you should see
one Action Menu item for each AT weapon you have. When selected it shows the animation of you switching from your primary weapon to your AT weapon.
I should see in the Action Menu list one entry that reads
"Weapon Javelin"
The Problem:
When I add more than one mode, I get
two Action Menu items suggesting that I currently have two AT weapons in my inventory. Upon further testing it is discovered that each Action Menu item starts the weapon in one mode or the other. This would be ok if I had control over the text of each seperate Action Menu item but I do not seem to.
Thus the problem is I see the following in the Action Menu list two entries for each mode with improper text.
"Weapon Javelin"
"Weapon Javelin"
How do I fix this?Here is the code:
or as shown here
class Javelin: Launcher
{
ACE_Weight = 6.42;
magazines[] = {"Javelin","ACE_Javelin"};
sound[] = {"\ace_sound_weapons\snd\Wep\Javelin_Fire.wss", 25, 1};
recoil = "ACE_EmptyRecoil";
ace_at_weapon = 1;
ace_at_unguided_weapon = 0;
};
class ACE_Javelin: Javelin
{
//magazines[] = {"ACE_Javelin"};
modes[] = {"ACE_Javelin_directFire","ACE_Javelin_topFire"};
class ACE_Javelin_directFire
{
displayName = $STR_ACE_WDN_ACE_JAVELIN_DIRECT;
sound[] = {"\ace_sound_weapons\snd\Wep\Javelin_Fire.wss", 25, 1};
drySound[] = {"", 0, 0};
soundContinuous = false;
burst = 1;
autoFire = 0;
soundBurst = 0;
multiplier = 1;
aiRateOfFire = 0.2;
aiRateOfFireDistance = 1500;
useAction = false;
useActionTitle = "Direct Mode";
reloadTime = 0;
magazineReloadTime = 12;
recoil = "ACE_EmptyRecoil";
recoilProne = "ACE_EmptyRecoil";
dispersion = 0.0025;
minRange = 50;
minRangeProbab = 0.04;
midRange = 200;
midRangeProbab = 0.7;
maxRange = 450;
maxRangeProbab = 0.04;
showToPlayer = true;
ace_at_weapon = 1;
ace_at_unguided_weapon = 0;
}
class ACE_Javelin_topFire: ACE_Javelin_directFire
{
displayName = $STR_ACE_WDN_ACE_JAVELIN_TOP;
minRange = 350;
minRangeProbab = 0.2;
midRange = 1050;
midRangeProbab = 0.9;
maxRange = 2500;
maxRangeProbab = 0.14;
ace_at_weapon = 1;
ace_at_unguided_weapon = 0;
useActionTitle = "Top Attack Mode";
}
};
Here is the Muzzle version of the code:
http://pb.6thsense.eu/pb/180Same problems.
How can I resolve this?