I'm tryng to make a unit fire a weapon when you press the special power button the only problem is...the script works only once, after the special power is reloaded and the button is available again, the specialpower cand go in to action but the weapon dosen't fire anymore, here's how it looks :
<SpecialPower id="ModuleTag_BeamLaserSpecialPower" SpecialPowerTemplate="SpecFireCannon" UpdateModuleStartsAttack="true" /> <WeaponFireSpecialAbilityUpdate id="ModuleTag_BeamLaserSpecialPowerUpdate" SpecialPowerTemplate="SpecFireCannon" SpecialWeapon="NODSpectrumCannonWeapon" UnpackSound="SpecCannonCharge" UnpackTime="3.5s" PreparationTime="1.1s" PackTime="0.1s" StartAbilityRange="450.0" AbilityAbortRange="450.0" SetObjectStatusOnTrigger="IS_ENGAGED" ClearObjectStatusOnExit="IS_ENGAGED" TriggerSound="NOD_Obelisk_LaserFireMS" WhichSpecialWeapon="1" WeaponSlotID="2" WeaponSlotType="SECONDARY_WEAPON" />The special power asset :
<SpecialPowerTemplate id="SpecFireCannon" DisallowedTargetObjectStatus="IN_STASIS" DisallowedTargetModelStates="TRANSPORT_MOVING MOVING" ReloadTime="6s" TargetType="OBJECT_OR_LOCATION"> </SpecialPowerTemplate>The weapon template asset :
<WeaponTemplate id="NODSpectrumCannonWeapon" Name="NODSpectrumCannonWeapon" AttackRange="530.0" WeaponSpeed="999999.0" RadiusDamageAffects="ALLIES ENEMIES NEUTRALS" AcceptableAimDelta="15d" CanFireWhileMoving="false" ReAcquireDetailType="PRE_FIRE" ClipSize="1" FireFX="FX_NODAvatarBeamFire" FireVeteranFX="FX_NODAvatarBeamFireHeroic"> <PreAttackDelay MinSeconds="0.5s" MaxSeconds="0.5s" /> <FiringDuration MinSeconds="0.75s" MaxSeconds="0.75s" /> <ClipReloadTime MinSeconds="0.2s" MaxSeconds="0.2s" /> <Nuggets> <ActivateLaserNugget Lifetime="0.75s" LaserId="2"/> <DamageNugget Damage="3000.0" Radius="0.0" DelayTimeSeconds="0.0s" DamageType="CANNON" DamageFXType="NOD_LASER" DeathType="NORMAL" /> </Nuggets> </WeaponTemplate>
I simply can't figure it out why does it do this...