PDA

View Full Version : Enabling a weapon?



Stygs
11-28-2011, 08:48 PM
Hi there, I have run into another anying problem with TWA:

I am trying to add some kind of KW epic (Hexapod) to TW - the basic outline works, but unlike KW, I want it affected by wepon upgrades.

Basicly, if I put a unit (Shock Trooper) into the Hexapod it should use a basic laser and switch to plasma disks after they have been purchased.

First, I tried this: (the upgrade is given when the units enter the Hexapod while the Status is triggered by the plasma disk upgrade)


<Weapon
Ordering="PRIMARY_WEAPON"
Template="AlienShockTrooperPulseCannonWeaponRM"
Upgrade="Upgrade_HexaSlot2_Discs" />
<Weapon
Ordering="PRIMARY_WEAPON"
Template="AlienShockTrooperPlasmaCannonTEST"
Upgrade="Upgrade_HexaSlot2_Discs"
ObjectStatus="WEAPON_UPGRADED_01" />


Didnt work - the unit ignored the ObjectStatus and fired the ugraded weapon whenever it felt like it as soon as the shock trooper entered the hexapod.
Then I added "RequiredFiringObjectStatus="WEAPON_UPGRADED_01"" into the upgraded weapon, resulting in the opposite - the weapon are fired from all slots, even the ones that where technicly empty.

Any other idee how I can solve that? kinda running out of ideas here...

EDIT: I just realized that the Hexapod never seems to use the default laser weapon, that might be the source of the whole problem.

Stygs
11-29-2011, 08:26 PM
OK, I tried some more and now the problem is this:

If I just use


<Weapon
Ordering="PRIMARY_WEAPON"
Template="AlienEradicator_ShockTrooperPulseCannon_RM"
Upgrade="Upgrade_HexaSlot2_Discs" />


the laser works fine, but as soon as I add a second weapon, it stopps working (even if the second weapon has RequiredFiringObjectStatus).

Any other idea how I could code that?

Lauren
11-29-2011, 09:13 PM
Both are primary weapons and as it seems fired from the same weapon slot. So if the second one gets activated the first one gets deactivated, that's the rule since Generals and you should know it :P

Stygs
11-29-2011, 09:17 PM
Of course I know this - but the first one gets deactived even if the second one has a RequiredFiringObjectStatus that forbidds it from firing. I guess the whole Upgrade="" logic screws up the Status settings.

Anyone, still need another way to fix that, or maybe I should go the EA way and just use the upgraded weapon as default :P