Posted by: Jay78 - Tuesday, November 26, 2013 9:48:35 PM
Hi, I have a problem I hope someone can help me with,
I have made a new air unit and it all works fine, except that it will not auto acquire the enemy within its viewing radius it just pointlessly sits there, however if i set it to guard an area it will attack the enemy just fine?
I've put alot of time into this mod so I would greatly appreciate if someone could point out what i've missed or done wrong.
Thanks in advance.
--------------------------------------------------------------------------------------
Factionunit.ini
------------------
Object AmericaVehicleDropship
SelectPortrait = SAChinook_L
ButtonImage = SAChinook
UpgradeCameo1 = Upgrade_AmericaAdvancedTraining
UpgradeCameo2 = Upgrade_AmericaCompositeArmor
Draw = W3DModelDraw ModuleTag_01
ExtraPublicBone = RopeStart
ExtraPublicBone = RopeEnd
DefaultConditionState
Model = USADropship
HideSubObject = burnerfx01 burnerfx02
ShowSubObject = burnerfx03 burnerfx04 burnerfx05 burnerfx06 burnerfx07
WeaponFireFXBone = PRIMARY MuzzleTG
WeaponRecoilBone = PRIMARY BarrelTG
WeaponMuzzleFlash = PRIMARY turretfxTG
WeaponLaunchBone = PRIMARY MuzzleTG
WeaponFireFXBone = SECONDARY MuzzleML
WeaponMuzzleFlash = SECONDARY turretfxML
WeaponLaunchBone = SECONDARY MuzzleML
WeaponFireFXBone = TERTIARY MuzzleMG
WeaponMuzzleFlash = TERTIARY turretfxMG
WeaponLaunchBone = TERTIARY MuzzleMG
End
ConditionState = MOVING
Model = USADropship
ShowSubObject = burnerfx01 burnerfx02 burnerfx03 burnerfx04 burnerfx05 burnerfx06 burnerfx07
WeaponFireFXBone = PRIMARY MuzzleTG
WeaponRecoilBone = PRIMARY BarrelTG
WeaponMuzzleFlash = PRIMARY turretfxTG
WeaponLaunchBone = PRIMARY MuzzleTG
WeaponFireFXBone = SECONDARY MuzzleML
WeaponMuzzleFlash = SECONDARY turretfxML
WeaponLaunchBone = SECONDARY MuzzleML
WeaponFireFXBone = TERTIARY MuzzleMG
WeaponMuzzleFlash = TERTIARY turretfxMG
WeaponLaunchBone = TERTIARY MuzzleMG
ParticleSysBone = WingTip01 JetContrailThin
ParticleSysBone = WingTip02 JetContrailThin
End
ConditionState = REALLYDAMAGED
Model = USADropship_D
HideSubObject = burnerfx01 burnerfx02 burnerfx04
ShowSubObject = burnerfx03 burnerfx05 burnerfx06 burnerfx07
WeaponFireFXBone = PRIMARY MuzzleTG
WeaponRecoilBone = PRIMARY BarrelTG
WeaponMuzzleFlash = PRIMARY turretfxTG
WeaponLaunchBone = PRIMARY MuzzleTG
WeaponFireFXBone = SECONDARY MuzzleML
WeaponMuzzleFlash = SECONDARY turretfxML
WeaponLaunchBone = SECONDARY MuzzleML
WeaponFireFXBone = TERTIARY MuzzleMG
WeaponMuzzleFlash = TERTIARY turretfxMG
WeaponLaunchBone = TERTIARY MuzzleMG
End
ConditionState = REALLYDAMAGED MOVING
Model = USADropship_D
HideSubObject = burnerfx02 burnerfx04
ShowSubObject = burnerfx01 burnerfx03 burnerfx05 burnerfx06 burnerfx07
WeaponFireFXBone = PRIMARY MuzzleTG
WeaponRecoilBone = PRIMARY BarrelTG
WeaponMuzzleFlash = PRIMARY turretfxTG
WeaponLaunchBone = PRIMARY MuzzleTG
WeaponFireFXBone = SECONDARY MuzzleML
WeaponMuzzleFlash = SECONDARY turretfxML
WeaponLaunchBone = SECONDARY MuzzleML
WeaponFireFXBone = TERTIARY MuzzleMG
WeaponMuzzleFlash = TERTIARY turretfxMG
WeaponLaunchBone = TERTIARY MuzzleMG
End
ConditionState = RUBBLE
Model = USADropship_D
End
ConditionState = RUBBLE SPECIAL_DAMAGED
Model = USADropship_D
HideSubObject = BarrelTG02
HideSubObject = BarrelML01
End
OkToChangeModelColor = Yes
End
Draw = W3DModelDraw ModuleTag_02
ConditionState = NONE
Model = None
TransitionKey = TRANS_Empty
WaitForStateToFinishIfPossible = TRANS_Unloading
End
ConditionState = DYING
Model = None
End
AliasConditionState = RUBBLE
AliasConditionState = CARRYING RUBBLE
AliasConditionState = DOCKING RUBBLE
AliasConditionState = DOCKING CARRYING RUBBLE
ConditionState = CARRYING
Model = AVChinook_A
Animation = AVChinook_A.AVChinook_A
AnimationMode = LOOP
TransitionKey = TRANS_Full
WaitForStateToFinishIfPossible = TRANS_PickingUp
End
ConditionState = DOCKING
Model = AVChinook_A1MSH
Animation = AVChinook_A1SK.AVChinook_A1
AnimationMode = ONCE_BACKWARDS
Flags = START_FRAME_LAST
AnimationSpeedFactorRange = .75 .75
TransitionKey = TRANS_PickingUp
WaitForStateToFinishIfPossible = TRANS_Unloading
End
ConditionState = DOCKING CARRYING
Model = AVChinook_A1MSH
Animation = AVChinook_A1SK.AVChinook_A1
AnimationMode = ONCE
AnimationSpeedFactorRange = 2.75 2.75
TransitionKey = TRANS_Unloading
WaitForStateToFinishIfPossible = TRANS_PickingUp
End
End
Draw = W3DModelDraw ModuleTag_RotorWashEffects01
OkToChangeModelColor = Yes
ConditionState = NONE
Model = NVDeva_U2
ParticleSysBone = NONE Helidirtsand
End
ConditionState = REALLYDAMAGED
Model = NVDeva_U2
ParticleSysBone = NONE Helidirtsand
End
ConditionState = SNOW
Model = NVDeva_U2
ParticleSysBone = NONE Helidirtsnow
End
ConditionState = SNOW REALLYDAMAGED
Model = NVDeva_U2
ParticleSysBone = NONE Helidirtsnow
End
ConditionState = OVER_WATER
Model = NVDeva_U2
ParticleSysBone = NONE Helidirtwater
End
ConditionState = OVER_WATER REALLYDAMAGED
Model = NVDeva_U2
ParticleSysBone = NONE Helidirtwater
End
ConditionState = SNOW OVER_WATER
Model = NVDeva_U2
ParticleSysBone = NONE Helidirtwater
End
ConditionState = SNOW OVER_WATER REALLYDAMAGED
Model = NVDeva_U2
ParticleSysBone = NONE Helidirtwater
End
End
DisplayName = OBJECT:Armoured Dropship
EditorSorting = VEHICLE
Side = America
TransportSlotCount = 0
VisionRange = 300
ShroudClearingRange = 350
Prerequisites
Object = AmericaAirfield
End
WeaponSet
Conditions = None
Weapon = PRIMARY USADropshipCannon
PreferredAgainst = PRIMARY VEHICLE STRUCTURE
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
Weapon = SECONDARY USADropshipAntiTankMissile
PreferredAgainst = SECONDARY VEHICLE STRUCTURE
AutoChooseSources = SECONDARY FROM_PLAYER FROM_SCRIPT FROM_AI
Weapon = TERTIARY USADropshipChainGun
PreferredAgainst = TERTIARY INFANTRY AIRCRAFT
AutoChooseSources = TERTIARY FROM_PLAYER FROM_SCRIPT FROM_AI
End
Behavior = AIUpdateInterface ModuleTag_03
AutoAcquireEnemiesWhenIdle = Yes
End
BuildCost = 3000
BuildTime = 20
ExperienceValue = 100 150 300 450
ExperienceRequired = 0 260 520 1040
IsTrainable = Yes
CommandSet = AmericaVehicleDropshipCommandSet
ArmorSet
Conditions = None
Armor = AmericaVehicleDropshipArmor
DamageFX = None
End
VoiceSelect = ChinookVoiceSelect
VoiceMove = ChinookVoiceMove
VoiceGuard = ComancheVoiceMove
VoiceAttack = ChinookVoiceAttack
SoundAmbient = AuroraBomberAmbientLoop
SoundAmbientRubble = NoSound
SoundDie = ChinookVoiceFalling
SoundEnter = HumveeEnter
SoundExit = HumveeExit
UnitSpecificSounds
VoiceCreate = ChinookVoiceCreate
VoiceSupply = ChinookVoiceSupply
VoiceUnload = ChinookVoiceUnload
VoiceCombatDrop = ChinookVoiceCombatDrop
VoiceClearBuilding = RangerVoiceClearBuilding
VoiceGarrison = ChinookVoiceMove
SoundEject = PilotSoundEject
VoiceEject = PilotVoiceEject
TurretMoveStart = NoSound
TurretMoveLoop = TurretMoveLoop
End
RadarPriority = UNIT
KindOf = PRELOAD CAN_CAST_REFLECTIONS SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT VEHICLE TRANSPORT AIRCRAFT HARVESTER SCORE PRODUCED_AT_HELIPAD
Behavior = ExperienceScalarUpgrade ModuleTag_03
TriggeredBy = Upgrade_AmericaAdvancedTraining
AddXPScalar = 1
End
Behavior = MaxHealthUpgrade ModuleTag_09
TriggeredBy = Upgrade_AmericaCompositeArmor
AddMaxHealth = 125
ChangeType = ADD_CURRENT_HEALTH_TOO
End
Body = ActiveBody ModuleTag_03
MaxHealth = 400
InitialHealth = 400
End
Behavior = FXListDie ModuleTag_05
DeathFX = FX_HelicopterStartDeath
End
Behavior = TransitionDamageFX ModuleTag_06
ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmokeSmallContinuousDown
ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_ComancheDamageTransition
End
Behavior = ChinookAIUpdate ModuleTag_07
MaxBoxes = 8
SupplyCenterActionDelay = 3000
SupplyWarehouseActionDelay = 1250
SupplyWarehouseScanDistance = 700
SuppliesDepletedVoice = ChinookVoiceSuppliesDepleted
NumRopes = 4
PerRopeDelayMin = 900
PerRopeDelayMax = 1500
RopeWidth = 0.5
RopeColor = R:0 G:0 B:0
RopeWobbleLen = 10
RopeWobbleAmplitude = 0.25
RopeWobbleRate = 180
RopeFinalHeight = 10
RappelSpeed = 30
MinDropHeight = 40
End
Locomotor = SET_NORMAL DropshipLocomotor
Locomotor = SET_TAXIING BasicHelicopterTaxiLocomotor
Behavior = TransportContain ModuleTag_08
Slots = 7
DamagePercentToUnits = 100%
AllowInsideKindOf = INFANTRY VEHICLE
ForbidInsideKindOf = AIRCRAFT HUGE_VEHICLE
ExitDelay = 100
NumberOfExitPaths = 1
End
Behavior = PhysicsBehavior ModuleTag_09
Mass = 50
End
Behavior = HelicopterSlowDeathBehavior ModuleTag_08
DestructionDelay = 99999999 ; the destruction delay
SpiralOrbitTurnRate = 140.0 ; in degrees per second, bigger # = tighter spiral
SpiralOrbitForwardSpeed = 350.0 ; bigger # = larger spiral
SpiralOrbitForwardSpeedDamping = .9999 ; smaller #'s = slow down faster
MaxBraking = 190 ; max braking we can use during death spiral (lower num = wilder spiral)
SoundDeathLoop = ComancheDamagedLoop
MinSelfSpin = 100 ; in degrees per second
MaxSelfSpin = 300 ; in degrees per second
SelfSpinUpdateDelay = 100 ; in milliseconds
SelfSpinUpdateAmount = 10 ; in degrees
FallHowFast = 12.0% ; fraction of gravity, lower = take longer to fall
MinBladeFlyOffDelay = 1500 ; in milliseconds
MaxBladeFlyOffDelay = 1500 ; in milliseconds
AttachParticle = SootySmokeTrail
AttachParticleBone = Propeller02
BladeObjectName = ComancheBlades
BladeBoneName = Propeller01
; Most things that eject pilots do so immediately upon death,
; via use of EjectPilotDie, but Helicopters are a special case...
; they need to do so after their blades are ejected.
OCLEjectPilot = OCL_EjectPilotViaParachute
FXBlade = FX_HelicopterBladeExplosion
OCLBlade = OCL_HelicopterBladeExplosion
FXHitGround = FX_HelicopterHitGround
OCLHitGround = OCL_HelicopterHitGround
FXFinalBlowUp = FX_GroundedHelicopterBlowUp
OCLFinalBlowUp = OCL_GroundedHelicopterBlowUp
DelayFromGroundToFinalDeath = 1500
FinalRubbleObject = DropshipRubbleHull
End
Behavior = FlammableUpdate ModuleTag_21
AflameDuration = 5000
AflameDamageAmount = 3
AflameDamageDelay = 500
End
Geometry = BOX
GeometryMajorRadius = 20
GeometryMinorRadius = 6
GeometryHeight = 12
GeometryIsSmall = No
Shadow = SHADOW_VOLUME
ShadowSizeX = 89
End
--------------------------------------------------------------------------------------
Weapon.ini
------------------
Weapon USADropshipChainGun
PrimaryDamage = 40
PrimaryDamageRadius = 0
AttackRange = 150
DamageType = SMALL_ARMS
DeathType = NORMAL
ProjectileObject = NONE
FireFX = WeaponFX_GenericMachineGunFire
VeterancyFireFX = HEROIC WeaponFX_GenericMachineGunFireWithRedTracers
FireSound = RangerWeapon
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
DelayBetweenShots = 136
ClipSize = 15
ClipReloadTime = 646
AntiAirborneVehicle = Yes
AntiAirborneInfantry = Yes
End
;----------------
Weapon USADropshipCannon
PrimaryDamage = 100
PrimaryDamageRadius = 10
SecondaryDamage = 15
SecondaryDamageRadius = 14
ScatterRadius = 10
ScatterRadiusVsInfantry = 30
AttackRange = 300
MinimumAttackRange = 10
;MinTargetPitch = -15
;MaxTargetPitch = 15
DamageType = ARMOR_PIERCING
DeathType = EXPLODED
WeaponSpeed = 1000
WeaponRecoil = 2
ProjectileObject = OverlordTankShell
FireFX = WeaponFX_StrongGenericTankGunNoTracer
VeterancyFireFX = HEROIC WeaponFX_HeroicStrongGenericTankGunNoTracer
ProjectileDetonationFX = WeaponFX_OverlordTankShellDetonation
FireSound = OverlordTankWeapon
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
DelayBetweenShots = 500
ShotsPerBarrel = 1
ClipSize = 4
ClipReloadTime = 3100
WeaponBonus = PLAYER_UPGRADE DAMAGE 125%
ProjectileCollidesWith = STRUCTURES WALLS
AntiAirborneVehicle = No
AntiAirborneInfantry = No
AntiGround = Yes
End
;----------------
Weapon USADropshipAntiTankMissile
PrimaryDamage = 100
PrimaryDamageRadius = 5
SecondaryDamage = 15
SecondaryDamageRadius = 15
ScatterRadiusVsInfantry = 20
AttackRange = 300
MinimumAttackRange = 10
DamageType = EXPLOSION
DeathType = EXPLODED
ProjectileObject = ComancheAntiTankMissile
ProjectileExhaust = ComancheMissileExhaust
VeterancyProjectileExhaust = HEROIC HeroicComancheMissileExhaust
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
DelayBetweenShots = 800
ClipSize = 4
AutoReloadsClip = Yes
ClipReloadTime = 15000
AutoReloadWhenIdle = 15100
FireFX = FX_ComancheRocketIgnition
ProjectileDetonationFX = WeaponFX_ComancheAntiTankMissileDetonation
ProjectileCollidesWith = STRUCTURES
AntiAirborneVehicle = No
AntiAirborneInfantry = No
AntiGround = Yes
ShowsAmmoPips = Yes
End
Posted by: Annihilationzh - Wednesday, November 27, 2013 9:09:59 AM
Add this to the AI update
[code] AutoAcquireEnemiesWhenIdle = Yes[/code]
Posted by: Jay78 - Wednesday, November 27, 2013 4:08:52 PM
Thankyou for helping me, I've tested it and it works fine now, I can't believe I put that in the wrong place, to many late nights modding I guess, Im making it for my kids and they will be chuffed that it's now playable.
Thanks again.
Posted by: Annihilationzh - Wednesday, November 27, 2013 5:22:55 PM
You probably shouldn't have added an AIUpdateInterface either. That would normally cause a crash, and it may well cause instability.