Jump to content


Photo

WeaponFireSpecialAbilityUpdate problem


  • Please log in to reply
2 replies to this topic

#1 Venin

Venin
  • Members
  • 26 posts

Posted 22 October 2009 - 12:52 PM

Hi to all,

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...

#2 Madin

Madin

    title available

  • Hosted
  • 686 posts

Posted 23 October 2009 - 12:09 AM

I see a clip size=1, but no provision for a reload.
Golan knows best, but I think that you must have a "AutoReloadsClip" attribute to define the weapon reload type.
<xs:simpleType name="WeaponReloadType">
		   <xs:restriction base="xs:string">
			   <xs:enumeration value="AUTO" />
			   <xs:enumeration value="NONE" />
			   <xs:enumeration value="RETURN_TO_BASE" />
Use an enumeration value (above) that best suits your unit.
Adjust the clip reload time to more closely match your "Specialpower" reload time if necessary.

#3 Venin

Venin
  • Members
  • 26 posts

Posted 23 October 2009 - 06:48 PM

Thank's, but I found something else more useful for the weapons...Something like the how Ion storm is deployed for the Planetary Assault Carrier.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users