0
Tiberian Dawn 'Deploying' Sam site issues
Started By Madin, Dec 12 2010 13:34
9 replies to this topic
#1
Posted 12 December 2010 - 13:34
So I have a Sam site that Deploys in a style similar to the Tiberian Dawn Nod Sam site.
The problem that I'm having is that if it unpacks and does not destroy the target it unpacked for (ie the aircraft gets away), then the Sam site will stay in its deployed state and will not pack up and return underground. If another target comes along and the still deployed Sam site destroys it, then it will pack up.
If the Sam site unpacks for a target and successfully destroys the target, then it will pack up and return underground.
So I'd like to know if there are any settings that I could use to insure that the Sam site packs up if no target is in range, regardless of whether the target it unpacked for is destroyed or not.
The problem that I'm having is that if it unpacks and does not destroy the target it unpacked for (ie the aircraft gets away), then the Sam site will stay in its deployed state and will not pack up and return underground. If another target comes along and the still deployed Sam site destroys it, then it will pack up.
If the Sam site unpacks for a target and successfully destroys the target, then it will pack up and return underground.
So I'd like to know if there are any settings that I could use to insure that the Sam site packs up if no target is in range, regardless of whether the target it unpacked for is destroyed or not.
#2
Posted 12 December 2010 - 14:22
The Code. Post it. Ol' Jenkins' Crystal Ball store recalled all Crystal Balls because of malfunctions
#3
Posted 12 December 2010 - 14:45
Say...why don't you find a way to make the whole SAM site pop up an animation?
#4
Posted 12 December 2010 - 15:20
<AI> <DeployStyleAIUpdate id="ModuleTag_AI" AutoAcquireEnemiesWhenIdle="YES" UnpackTime="1.0s" PackTime="1.0s" MustDeployToAttack="true"> <UnitAITargetChooserData CheckVisionRange="false" CanPickDynamicTargets="false" RotateToTargetWhenAiming="false" /> </DeployStyleAIUpdate> </AI>
<WeaponTemplate id="NODLaserCannonWeapon" Name="NODLaserCannonWeapon" AttackRange="350.0" WeaponSpeed="999999.0" RadiusDamageAffects="ALLIES ENEMIES NEUTRALS" AcceptableAimDelta="180d" FireSound="NOD_LaserCannon_WeaponFire" FireFX="FX_NODSpitfireFire" ReAcquireDetailType="POST_FIRE" RequiredFiringObjectStatus="DEPLOYED" ClipSize="2" ShotsPerBarrel="1"> <FiringDuration MinSeconds="1.1s" MaxSeconds="1.1s" /> <ClipReloadTime MinSeconds="3.0s" MaxSeconds="3.0s" /> <Nuggets> <ActivateLaserNugget Lifetime="0.8s" LaserId="0" HitGroundFX="FX_NODSpitfireHit"/> <DamageNugget Damage="140.0" Radius="0.0" DelayTimeSeconds="0.5s" DamageType="CANNON" DamageFXType="NOD_LASER" DeathType="NORMAL"> <DamageScalarDetails Scalar= "50%"> <Filter Rule="NONE" Include="INFANTRY" /> </DamageScalarDetails> </DamageNugget> </Nuggets> </WeaponTemplate>
The code for a 'deploying' Weapon. Works without problems so far.
#5
Posted 12 December 2010 - 16:42
I'd suggest not to use DeployAI on stationary objects. It doesn't synergize well. Use a delay on the weapon and the ATTACKING ModelCondition instead.
Now go out and procreate. IN THE NAME OF DOOM!
#6
Posted 12 December 2010 - 16:50
I had no problems with it so far, it works well on the Laser turret.
#7
Posted 12 December 2010 - 19:14
Destiny, on 12 Dec 2010, 14:45, said:
Say...why don't you find a way to make the whole SAM site pop up an animation?
It is an animation
Golan, on 12 Dec 2010, 16:42, said:
I'd suggest not to use DeployAI on stationary objects. It doesn't synergize well. Use a delay on the weapon and the ATTACKING ModelCondition instead.
I'll give that a go if all else fails.
Thanks for the code Sgt. Rho!
Edited by Madin, 12 December 2010 - 19:15.
#8
Posted 21 January 2011 - 23:14
I guess that if I'm using the 'ATTACKING' model condition, I should be using a different 'AIUpdate', does it matter which one?
The 'DeployUpdate' handles the 'PACKING' animation, which I don't think other 'AIUpdates' do.
Both the 'DEPLOY' and 'ATTACKING' methods of coding a pop-up SAM have a bug were the SAM will occasionally fire without 'DEPLOYING'\'UNPACKING', is there any thoughts on how I can get around this?, has this kind of defeats the purpose of a pop-up SAM!
Some code:
Draw
AI Update
Weapon
The 'DeployUpdate' handles the 'PACKING' animation, which I don't think other 'AIUpdates' do.
Both the 'DEPLOY' and 'ATTACKING' methods of coding a pop-up SAM have a bug were the SAM will occasionally fire without 'DEPLOYING'\'UNPACKING', is there any thoughts on how I can get around this?, has this kind of defeats the purpose of a pop-up SAM!
Some code:
Draw
<scriptedModelDraw id="ModuleTag_Draw_Sam" OkToChangeModelColor="true" ExtraPublicBone="WeaponFX01 WeaponFX02 WeaponFX03 WeaponFX04 WeaponFX05 WeaponFX06"> <ModelConditionState ParseCondStateType="PARSE_DEFAULT"> <Model Name="NB_SAMMain_SKN" /> <WeaponFireFXBone WeaponSlotID="1" WeaponSlotType="PRIMARY_WEAPON" BoneName="WeaponFX" /> </ModelConditionState> <ModelConditionState ParseCondStateType="PARSE_NORMAL" ConditionsYes="STRUCTURE_UNPACKING"> <Model Name="NB_SAMMain_SKN" /> </ModelConditionState> <ModelConditionState ParseCondStateType="PARSE_NORMAL" ConditionsYes="UNPACKING"> <Model Name="NB_SAMMain_SKN" /> </ModelConditionState> <ModelConditionState ParseCondStateType="PARSE_NORMAL" ConditionsYes="PACKING"> <Model Name="NB_SAMMain_SKN" /> </ModelConditionState> <ModelConditionState ParseCondStateType="PARSE_NORMAL" ConditionsYes="DEPLOYED"> <Model Name="NB_SAMMain_SKN" /> <WeaponFireFXBone WeaponSlotID="1" WeaponSlotType="PRIMARY_WEAPON" BoneName="WeaponFX" /> <Turret TurretNameKey="Bone_Turret" TurretPitch="Bone_Pivot" TurretID="1" /> </ModelConditionState> <ModelConditionState ParseCondStateType="PARSE_NORMAL" ConditionsYes="DAMAGED"> <Model Name="NB_SAMMain_SKN" /> <Texture Original="NBSamSite" New="NBSamSiteD" /> <Texture Original="NBSamSite_NRM" New="NBSamSiteD_NRM" /> </ModelConditionState> <ModelConditionState ParseCondStateType="PARSE_NORMAL" ConditionsYes="REALLYDAMAGED"> <Model Name="NB_SAMMain_SKN" /> <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_NORMAL" ConditionsYes="STRUCTURE_UNPACKING"> <Animation AnimationName="NB_SAMMain_AAN" AnimationMode="ONCE" /> </AnimationState> <AnimationState ParseCondStateType="PARSE_NORMAL" ConditionsYes="UNPACKING"> <Animation AnimationName="NB_SAMMain_DPLY" AnimationMode="ONCE" AnimationBlendTime="0" AnimationSpeedFactorMin="3.0" AnimationSpeedFactorMax="3.0" /> </AnimationState> <AnimationState ParseCondStateType="PARSE_NORMAL" ConditionsYes="PACKING" Flags="START_FRAME_LAST"> <Animation AnimationName="NB_SAMMain_DPLY" AnimationMode="ONCE_BACKWARDS" AnimationBlendTime="0" AnimationSpeedFactorMin="1.5" AnimationSpeedFactorMax="1.5" /> </AnimationState> <AnimationState ParseCondStateType="PARSE_NORMAL" ConditionsYes="DEPLOYED" Flags="START_FRAME_LAST"> <Animation AnimationName="NB_SAMMain_DPLY" AnimationMode="MANUAL" /> </AnimationState>
AI Update
<AI> <DeployStyleAIUpdate id="ModuleTag_AI" AutoAcquireEnemiesWhenIdle="YES" UnpackTime="0.2s" PackTime="0.2s" TurretsMustCenterBeforePacking="true" MustDeployToAttack="true"> <UnitAITargetChooserData CheckVisionRange="false" CanPickDynamicTargets="false" RotateToTargetWhenAiming="true" /> </DeployStyleAIUpdate> </AI>
Weapon
<WeaponTemplate id="NODSamSiteWeapon" Name="NODSamSiteWeapon" AttackRange="500.0" WeaponSpeed="350" RadiusDamageAffects="ALLIES ENEMIES NEUTRALS" AcceptableAimDelta="10d" FireSound="NOD_RocketBunkerHub_RocketLaunch" FireFX="FX_NODMilitantMissileFire" ClipSize="6" ProjectileCollidesWith="ALLIES ENEMIES NEUTRAL STRUCTURES WALLS" ReAcquireDetailType="PER_SHOT" AntiMask="ANTI_AIRBORNE_VEHICLE ANTI_AIRBORNE_INFANTRY" PreAttackType="PER_TARGET"> <!--WeaponPrefireType="PER_BURST"--> <!--<PreAttackDelay MinSeconds="2.0s" MaxSeconds="2.0s" xmlns="uri:ea.com:eala:asset" />--> <FiringDuration MinSeconds="2.0s" MaxSeconds="2.0s" /> <ClipReloadTime MinSeconds="0.2s" MaxSeconds="0.2s" /> <Nuggets> <ProjectileNugget WarheadTemplate="NODSamSiteWeaponWarhead" ProjectileTemplate="NODSamSiteWeaponProjectile" /> <SuppressionNugget Radius="50.0" Suppression="50" DurationSeconds="2s" /> <AttributeModifierNugget PartitionFilterTestType="SPHERE" AttributeModifierOwnerName="Modifier_SamSiteWeaponFiring" /> </Nuggets> <ScatterRadiusVsType Radius="30.0"> <Filter Rule="NONE" Include="INFANTRY" /> </ScatterRadiusVsType> </WeaponTemplate>
#9
Posted 23 January 2011 - 12:17
It seems to me as if you missed this line:
RequiredFiringObjectStatus="DEPLOYED"
#10
Posted 24 January 2011 - 03:32
If I add that line it never deploys to fire at all!
If people have got it working without bugs, then it must be an issue with the way my model is coded.
If people have got it working without bugs, then it must be an issue with the way my model is coded.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users