Posted by: joey55 - Monday, April 4, 2011 8:50:27 AM
i made a new nuke launcher that has a primary weapon that fires a missil evry 5sec and a secondary weapon that fires 10 misiles and than has a 1min cooldown but sometimes when they are firing with the primary weapon they fire the secondary weapon. how does this happen? thanks[smile] maybe you have something on this codes: AM=primary wep BM=secondary wep [code]Weapon BM PrimaryDamage = 100.0 PrimaryDamageRadius = 5.0 SecondaryDamage = 80.0 SecondaryDamageRadius = 25.0 ScatterRadius = 50.0 ScatterRadiusVsInfantry = 10.0 ;When this weapon is used against infantry, it can randomly miss by as much as this distance. AttackRange = 250.0 MinimumAttackRange = 100.0 DamageType = EXPLOSION ; ignored for projectile weapons DeathType = EXPLODED WeaponSpeed = 600 ; ignored for projectile weapons ProjectileObject = ScorpionMissile ProjectileExhaust = MissileExhaust VeterancyProjectileExhaust = HEROIC HeroicMissileExhaust FireFX = FX_BuggyMissileIgnition FireSound = ScorpionMissileWeapon RadiusDamageAffects = ALLIES ENEMIES NEUTRALS DelayBetweenShots = 500 ; time between shots, msec ClipSize = 10 ; how many shots in a Clip (0 == infinite) ClipReloadTime = 60000 ; how long to reload a Clip, msec AutoReloadsClip = Yes ProjectileDetonationFX = WeaponFX_RocketBuggyMissileDetonation ProjectileDetonationOCL = OCL_PoisonFieldGammaSmall AutoReloadsClip = Yes ; note, these only apply to units that aren't the explicit target ; (ie, units that just happen to "get in the way"... projectiles ; always collide with the Designated Target, regardless of these flags ProjectileCollidesWith = STRUCTURES WeaponBonus = PLAYER_UPGRADE DAMAGE 125% ; AP weapon upgrade End Weapon AM PrimaryDamage = 200.0 PrimaryDamageRadius = 5.0 SecondaryDamage = 80.0 SecondaryDamageRadius = 25.0 ScatterRadiusVsInfantry = 10.0 ;When this weapon is used against infantry, it can randomly miss by as much as this distance. AttackRange = 250.0 MinimumAttackRange = 100.0 DamageType = EXPLOSION ; ignored for projectile weapons DeathType = EXPLODED WeaponSpeed = 600 ; ignored for projectile weapons ProjectileObject = ScorpionMissile ProjectileExhaust = MissileExhaust VeterancyProjectileExhaust = HEROIC HeroicMissileExhaust FireFX = FX_BuggyMissileIgnition FireSound = ScorpionMissileWeapon RadiusDamageAffects = ALLIES ENEMIES NEUTRALS DelayBetweenShots = 5000 ; time between shots, msec ClipSize = 0 ; how many shots in a Clip (0 == infinite) ClipReloadTime = 15000 ; how long to reload a Clip, msec AutoReloadsClip = Yes ProjectileDetonationFX = WeaponFX_RocketBuggyMissileDetonation ProjectileDetonationOCL = OCL_PoisonFieldGammaSmall AntiAirborneVehicle = Yes AntiGround = Yes AntiBallisticMissile = Yes ; note, these only apply to units that aren't the explicit target ; (ie, units that just happen to "get in the way"... projectiles ; always collide with the Designated Target, regardless of these flags ProjectileCollidesWith = STRUCTURES WeaponBonus = PLAYER_UPGRADE DAMAGE 125% ; AP weapon upgrade End [/code] command set: [code]CommandSet ThunderReaperReaperCommandSet ;1 = Command_ChinaNukeWarhead 3 = Command_BM 11 = Command_AttackMove 13 = Command_Guard 14 = Command_Stop End[/code] command buttons: [code]CommandButton Command_ConstructThunderReaperReaper Command = UNIT_BUILD Object = ThunderReaperReaper TextLabel = CONTROLBAR:ConstructThunderReaperReaper ButtonImage = SNNukeCannon ButtonBorderType = BUILD ; Identifier for the User as to what kind of button this is DescriptLabel = CONTROLBAR:ToolTipChinaBuildNukeLauncher End CommandButton Command_BM Command = FIRE_WEAPON WeaponSlot = SECONDARY ; Best if this matches up with an AutoChoose listing that forbids this slot normally Options = NEED_TARGET_POS TextLabel = CONTROLBAR:Contaminate ButtonImage = SAPowTruck ButtonBorderType = ACTION ; Identifier for the User as to what kind of button this is DescriptLabel = CONTROLBAR:ToolTipGLAFireToxinTractorSlime UnitSpecificSound = ToxinTractorVoiceModeContam End[/code] the unit itself: [code]Object ThunderReaperReaper ; *** ART Parameters *** SelectPortrait = SNNukeCannon_L ButtonImage = SNNukeCannon ;UpgradeCameo1 = Upgrade_ChinaNeutronShells ;UpgradeCameo2 = NONE ;UpgradeCameo3 = NONE ;UpgradeCameo4 = NONE ;UpgradeCameo5 = NONE Draw = W3DTankDraw ModuleTag_01 InitialRecoilSpeed = 120 MaxRecoilDistance = 8 RecoilSettleSpeed = 6 OkToChangeModelColor = Yes ExtraPublicBone = Turret01 DefaultConditionState Model = NVNukeCn WeaponLaunchBone = PRIMARY Muzzle WeaponMuzzleFlash = PRIMARY MuzzleFX WeaponFireFXBone = PRIMARY Muzzle WeaponRecoilBone = PRIMARY Barrel WeaponLaunchBone = SECONDARY Muzzle WeaponMuzzleFlash = SECONDARY MuzzleFX WeaponFireFXBone = SECONDARY Muzzle WeaponRecoilBone = SECONDARY Barrel HideSubObject = TURRET01 ;Hide controlled turret ShowSubObject = TURRETFRONT TURRETBACK ;Show pack/unpack animated turret Turret = Turret01 TurretPitch = TurretEL End ConditionState = RUBBLE Model = NVNukeCn_D1 WeaponLaunchBone = PRIMARY Muzzle WeaponMuzzleFlash = PRIMARY MuzzleFX WeaponRecoilBone = PRIMARY Barrel WeaponLaunchBone = SECONDARY Muzzle WeaponMuzzleFlash = SECONDARY MuzzleFX WeaponRecoilBone = SECONDARY Barrel HideSubObject = TURRET01 ;Hide controlled turret ShowSubObject = TURRETFRONT TURRETBACK ;Show pack/unpack animated turret Turret = Turret01 TurretPitch = TurretEL End ;*** PACKED STATE -- ready to move *** ConditionState = MOVING Animation = NVNukeCn.NVNukeCn AnimationMode = ONCE_BACKWARDS Flags = START_FRAME_FIRST End AliasConditionState = MOVING BETWEEN_FIRING_SHOTS_A ;Very long shot delay -- possibly moving AliasConditionState = BETWEEN_FIRING_SHOTS_A ;*** ConditionState = REALLYDAMAGED MOVING Model = NVNukeCn_D Animation = NVNukeCn_D.NVNukeCn_D AnimationMode = ONCE_BACKWARDS Flags = START_FRAME_FIRST End AliasConditionState = REALLYDAMAGED MOVING BETWEEN_FIRING_SHOTS_A ;Very long shot delay -- possibly moving ;*** UNPACKING STATE -- preparing to fire *** ConditionState = UNPACKING Animation = NVNukeCn.NVNukeCn AnimationMode = MANUAL End AliasConditionState = UNPACKING BETWEEN_FIRING_SHOTS_A ;Very long shot delay ;*** ConditionState = REALLYDAMAGED UNPACKING Model = NVNukeCn_D Animation = NVNukeCn_D.NVNukeCn_D AnimationMode = MANUAL End AliasConditionState = REALLYDAMAGED UNPACKING BETWEEN_FIRING_SHOTS_A ;Very long shot delay ;*** PACKING STATE -- preparing to move *** ConditionState = PACKING Animation = NVNukeCn.NVNukeCn AnimationMode = MANUAL End AliasConditionState = PACKING BETWEEN_FIRING_SHOTS_A ;Very long shot delay ;*** ConditionState = REALLYDAMAGED PACKING Model = NVNukeCn_D Animation = NVNukeCn_D.NVNukeCn_D AnimationMode = MANUAL End AliasConditionState = REALLYDAMAGED PACKING BETWEEN_FIRING_SHOTS_A ;Very long shot delay ;*** DEPLOYED STATE -- ready to fire *** ConditionState = DEPLOYED Animation = NVNukeCn.NVNukeCn AnimationMode = ONCE Flags = START_FRAME_LAST TransitionKey = TRANS_FIRING_A HideSubObject = TURRETFRONT TURRETBACK ;Hide pack/unpack animated turret ShowSubObject = TURRET01 ;Show controlled turret End AliasConditionState = DEPLOYED FIRING_A AliasConditionState = DEPLOYED BETWEEN_FIRING_SHOTS_A AliasConditionState = DEPLOYED RELOADING_A AliasConditionState = DEPLOYED MOVING ConditionState = DEPLOYED REALLYDAMAGED Model = NVNukeCn_D Animation = NVNukeCn_D.NVNukeCn_D AnimationMode = ONCE Flags = START_FRAME_LAST TransitionKey = TRANS_FIRING_A HideSubObject = TURRETFRONT TURRETBACK ;Hide pack/unpack animated turret ShowSubObject = TURRET01 ;Show controlled turret End AliasConditionState = DEPLOYED REALLYDAMAGED FIRING_A AliasConditionState = DEPLOYED REALLYDAMAGED BETWEEN_FIRING_SHOTS_A AliasConditionState = DEPLOYED REALLYDAMAGED RELOADING_A AliasConditionState = DEPLOYED REALLYDAMAGED MOVING TrackMarks = EXTnkTrack.tga TreadAnimationRate = 4.0 ; amount of tread texture to move per second End ; ***DESIGN parameters *** DisplayName = OBJECT:ThunderReaperReaper Side = ThunderReaper EditorSorting = VEHICLE TransportSlotCount = 10 ;how many "slots" we take in a transport (0 == not transportable) WeaponSet Conditions = None Weapon = PRIMARY AM Weapon = SECONDARY BM PreferredAgainst = SECONDARY None End ArmorSet Conditions = None Armor = TankArmor DamageFX = TankDamageFX End BuildCost = 1600 BuildTime = 20.0 ;in seconds VisionRange = 180 ShroudClearingRange = 350 Prerequisites Object = ThunderReaperWarFactory End ExperienceValue = 50 100 200 400 ;Experience point value at each level ExperienceRequired = 0 400 600 1000 ;Experience points needed to gain each level IsTrainable = Yes ;Can gain experience CrusherLevel = 2 ;What can I crush?: 1 = infantry, 2 = trees, 3 = vehicles CrushableLevel = 2 ;What am I?: 0 = for infantry, 1 = for trees, 2 = general vehicles CommandSet = ThunderReaperReaperCommandSet ; *** AUDIO Parameters *** VoiceSelect = NukeCannonVoiceSelect VoiceMove = NukeCannonVoiceMove VoiceGuard = NukeCannonVoiceMove VoiceAttack = NukeCannonVoiceAttack SoundMoveStart = NukeCannonMoveStart SoundMoveStartDamaged = NukeCannonMoveStart UnitSpecificSounds ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs VoiceCreate = NukeCannonVoiceCreate TurretMoveStart = NoSound TurretMoveLoop = NukeCannonTurretMoveLoop VoiceEnter = NukeCannonVoiceMove Deploy = NukeCannonDeploy Undeploy = NukeCannonUnDeploy End ; *** ENGINEERING Parameters *** RadarPriority = UNIT KindOf = PRELOAD SELECTABLE CAN_ATTACK CAN_CAST_REFLECTIONS VEHICLE SCORE Body = ActiveBody ModuleTag_02 MaxHealth = 240.0 InitialHealth = 240.0 ; Subdual damage "Subdues" you (reaction defined by BodyModule) when it passes your max health. ; The cap limits how extra-subdued you can be, and the other numbers detemine how fast it drains away on its own. SubdualDamageCap = 480 SubdualDamageHealRate = 500 SubdualDamageHealAmount = 50 End Behavior = VeterancyGainCreate ModuleTag_03 StartingLevel = VETERAN ScienceRequired = SCIENCE_ArtilleryTraining End Behavior = DeployStyleAIUpdate ModuleTag_04 Turret TurretTurnRate = 80 TurretPitchRate = 80 FirePitch = 0 ; Instead of aiming pitchwise at the target, it will aim here AllowsPitch = Yes RecenterTime = 5000 ; how long to wait during idle before recentering ControlledWeaponSlots = PRIMARY SECONDARY NaturalTurretAngle = 0 InitiallyDisabled = Yes End AutoAcquireEnemiesWhenIdle = No PackTime = 3333 UnpackTime = 3333 TurretsFunctionOnlyWhenDeployed = Yes TurretsMustCenterBeforePacking = Yes ManualDeployAnimations = Yes End Locomotor = SET_NORMAL ChinaNukeCannonLocomotor Behavior = PhysicsBehavior ModuleTag_05 Mass = 50.0 End Behavior = SlowDeathBehavior ModuleTag_06 DeathTypes = ALL -CRUSHED -SPLATTED DestructionDelay = 500 DestructionDelayVariance = 100 FX = INITIAL FX_BattleMasterExplosionOneFinal OCL = INITIAL OCL_RadiationFieldSmall OCL = MIDPOINT OCL_ChinaVehicleNukeCannonDie OCL = FINAL OCL_RadiationFieldSmall FX = FINAL FX_ChinaVehicleNukeCannonDeathExplosion End ; A crushing defeat Behavior = FXListDie ModuleTag_07 DeathTypes = NONE +CRUSHED +SPLATTED DeathFX = FX_CarCrush End Behavior = CreateObjectDie ModuleTag_08 DeathTypes = NONE +CRUSHED +SPLATTED CreationList = OCL_CrusaderTank_CrushEffect End Behavior = CreateCrateDie ModuleTag_09 CrateData = SalvageCrateData ;CrateData = EliteTankCrateData ;CrateData = HeroicTankCrateData End Behavior = TransitionDamageFX ModuleTag_10 ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmallLightSmokeColumn ReallyDamagedFXList1 = Loc: X:0 Y:0 Z:0 FXList:FX_NukeCannonDamageTransition End Behavior = DestroyDie ModuleTag_11 DeathTypes = NONE +CRUSHED +SPLATTED End Behavior = FlammableUpdate ModuleTag_21 AflameDuration = 5000 ; If I catch fire, I'll burn for this long... AflameDamageAmount = 3 ; taking this much damage... AflameDamageDelay = 500 ; this often. End Behavior = ProductionUpdate ModuleTag_12 MaxQueueEntries = 1; So you can't build multiple upgrades in the same frame End Geometry = BOX GeometryMajorRadius = 32.0 GeometryMinorRadius = 10.0 GeometryHeight = 17.0 GeometryIsSmall = No Shadow = SHADOW_VOLUME ShadowSizeX = 45 ; minimum elevation angle above horizon. Used to limit shadow length End [/code]

Posted by: Annihilationzh - Monday, April 4, 2011 11:43:44 AM
Jarmen Kell: [code] WeaponSet Conditions = None Weapon = PRIMARY GLAJarmenKellRifle Weapon = SECONDARY GLAJarmenKellVehiclePilotSniperRifle AutoChooseSources = SECONDARY NONE End[/code] Yours: [code] WeaponSet Conditions = None Weapon = PRIMARY AM Weapon = SECONDARY BM PreferredAgainst = SECONDARY None End[/code] AutoChooseSources vs PreferredAgainst I'm thinking this is the problem, but tbh, I'm not entirely sure what the problem is.

Posted by: joey55 - Monday, April 4, 2011 12:14:01 PM
ill try it tomorow[wink]

Posted by: joey55 - Tuesday, April 5, 2011 6:33:44 AM
and you know what......it works[+1] [smile]