The 2 main issues are:
- The turret packs up after each kill. This means that for a squad of six infantry, the turret will deploy 6 separate times.
- The pack up animation does not work. I believe that this is because I am not using the deployAI module.
- When the model gets damaged, if it is attacking, it will not use the damaged texture but instead use the normal texture. Once it has packed up, it returns to the damaged texture.
Trying to use the deployAI module, the problem I have is that randomly the turret will fail to pack up after killing a target, also it will sometimes fail to unpack. Which makes it quite useless.
Any ideas? The main issue is the fact that the turret packs up after each kill, I have some code below.
Weapon
<WeaponTemplate id="NODLaserCannonWeapon" Name="NODLaserCannonWeapon" AttackRange="350.0" WeaponSpeed="999999.0" RadiusDamageAffects="ALLIES ENEMIES NEUTRALS" AcceptableAimDelta="0d" FireSound="NOD_LaserCannon_WeaponFire" FireFX="FX_NODSpitfireFire" ReAcquireDetailType="POST_FIRE" PreAttackType="PER_POSITION" ClipSize="1"> <PreAttackDelay MinSeconds="0.4s" MaxSeconds="0.4s"/> <FiringDuration MinSeconds="0.6s" MaxSeconds="0.6s"/> <ClipReloadTime MinSeconds="0.75s" MaxSeconds="0.75s"/> <Nuggets> <ActivateLaserNugget Lifetime="0.4s" LaserId="0" HitGroundFX="FX_NODSpitfireHit"/> <DamageNugget Damage="100.0" Radius="0.0" DelayTimeSeconds="0.2s" DamageType="GUN" DamageFXType="NOD_LASER" DeathType="NORMAL"> <!--<DamageScalarDetails Scalar="50%" xmlns="uri:ea.com:eala:asset"><Filter Rule="NONE" Include="INFANTRY" /></DamageScalarDetails> --> </DamageNugget> </Nuggets> </WeaponTemplate>
Laser turret Draw
<scriptedModelDraw id="ModuleTag_Draw_Sam" OkToChangeModelColor="true" ExtraPublicBone="WeaponFX01 WeaponFX02 WeaponFX03 WeaponFX04 WeaponFX05 WeaponFX06"> <ModelConditionState ParseCondStateType="PARSE_DEFAULT"> <Model Name="NBTSLaser" /> <WeaponFireFXBone WeaponSlotID="1" WeaponSlotType="PRIMARY_WEAPON" BoneName="FX_Weapon" /> <WeaponLaunchBone WeaponSlotID="1" WeaponSlotType="PRIMARY_WEAPON" BoneName="FX_Weapon" /> <Turret TurretNameKey="Turret" TurretPitch="Turret_Pitch" TurretID="1" /> </ModelConditionState> <ModelConditionState ParseCondStateType="PARSE_NORMAL" ConditionsYes="STRUCTURE_UNPACKING"> <Model Name="NBTSLaser_A" /> </ModelConditionState> <ModelConditionState ParseCondStateType="PARSE_NORMAL" ConditionsYes="UNPACKING"> <Model Name="NBTSLaser" /> </ModelConditionState> <ModelConditionState ParseCondStateType="PARSE_NORMAL" ConditionsYes="PACKING"> <Model Name="NBTSLaser" /> </ModelConditionState> <ModelConditionState ParseCondStateType="PARSE_NORMAL" ConditionsYes="ATTACKING"> <Model Name="NBTSLaser" /> </ModelConditionState> <ModelConditionState ParseCondStateType="PARSE_NORMAL" ConditionsYes="DAMAGED "> <Model Name="NBTSLaser" /> <Texture Original="NBSamSite" New="NBSamSiteD" /> <Texture Original="NBSamSite_NRM" New="NBSamSiteD_NRM" /> </ModelConditionState> <ModelConditionState ParseCondStateType="PARSE_NORMAL" ConditionsYes="REALLYDAMAGED"> <Model Name="NBTSLaser" /> <Texture Original="NBSamSite" New="NBSamSiteD" /> <Texture Original="NBSamSite_NRM" New="NBSamSiteD_NRM" /> <ParticleSysBone BoneName="Bone_Pivot" FXParticleSystemTemplate="GDIMammothDamagedSmoke" FollowBone="true" /> <ParticleSysBone BoneName="Bone_Pivot" FXParticleSystemTemplate="GDIWTDamagedDist" FollowBone="true" /> </ModelConditionState> <ModelConditionState ParseCondStateType="PARSE_NORMAL" ConditionsYes="DYING"> <Model Name="NB_SAMMainR" /> <ParticleSysBone BoneName="ROOTTRANSFORM" FXParticleSystemTemplate="GDIDebrisSmallFire" FollowBone="true" /> <ParticleSysBone BoneName="ROOTTRANSFORM" FXParticleSystemTemplate="GDIDebrisSmallFireDistortion" FollowBone="true" /> <ParticleSysBone BoneName="ROOTTRANSFORM" FXParticleSystemTemplate="GDIDebrisSmallSmoke" FollowBone="true" /> </ModelConditionState> <AnimationState ParseCondStateType="PARSE_DEFAULT"> <Animation AnimationName="NBTSLaser_DPLY" AnimationMode="MANUAL" Flags="START_FRAME_FIRST" /> </AnimationState> <AnimationState ParseCondStateType="PARSE_NORMAL" ConditionsYes="STRUCTURE_UNPACKING"> <Animation AnimationName="NBTSLaser_AAN" AnimationMode="ONCE" /> </AnimationState> <AnimationState ParseCondStateType="PARSE_NORMAL" ConditionsYes="UNPACKING"> <Animation AnimationName="NBTSLaser_DPLY" AnimationMode="ONCE" AnimationBlendTime="0" AnimationSpeedFactorMin="1.0" AnimationSpeedFactorMax="1.0" /> </AnimationState> <AnimationState ParseCondStateType="PARSE_NORMAL" ConditionsYes="PACKING" Flags="START_FRAME_LAST"> <Animation AnimationName="NBTSLaser_DPLY" AnimationMode="ONCE_BACKWARDS" AnimationBlendTime="0" AnimationSpeedFactorMin="0.5" AnimationSpeedFactorMax="0.5" /> </AnimationState> <AnimationState ParseCondStateType="PARSE_NORMAL" ConditionsYes="ATTACKING" Flags="START_FRAME_LAST"> <Animation AnimationName="NBTSLaser_DPLY" AnimationMode="MANUAL" /> </AnimationState> </ScriptedModelDraw>
Any help is appreciated!
Edited by Madin, 07 January 2012 - 21:40.