Originally Posted by: Annihilationzh The comanche fires the PRIMARY machine gun at everything. But it won't fire it's SECONDARY missiles at infantry because it's not told to in the code.
If you make the missiles the PRIMARY weapon they'll shoot at infantry.
Is that due to the lines
PreferredAgainst = PRIMARY INFANTRY
AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
Or is it some other part of the code?
The thing is, I got the molotov cocktail working on Minigunners working with the fake turret (copied from Comanche), not with weaponset stuff.
Anyhow my specific issue is resolved, just trying to understand how this all works.
Quote:I don't remember ever coming across that before. They do have a weapon - mine removing. It's possible that code is messing with it.
Oh I meant the SupplyTrucks with their arty weapon I added, sorry if it wasn't clear.
I'm fairly sure that it's a weapon range issue now. Is it impossible to have a functional unit with 2 weapons that have non-overlapping ranges? (in this case I had 100-300 and 0-100)
Quote:You're looking for System.ini
If I were to make a new weapon object, should it go to WeaponObjects.ini or System.ini?
Intuition says WeaponObjects, but I did just try that and it didn't work and there's this FirestormSmall that sits in System.ini and works.
Quote:Have you tested the dirty nuke? I have a vague memory that says something is wrong with it.
I just tested it as a historic bonus on the Inferno Cannon (since I know for a fact that the Inferno Cannon's historic bonus works fine). It works great actually!
Two other historic bonus weapons did not work great, however:
1. I tried BlackNapalmFirestormSmallCreationWeapon on my Katyusha launchers since I know it works for other weapons and has a very distinctive look, it did not trigger at all. My code looks like this:
Quote:Weapon KatyushaWeapon
PrimaryDamage = 10.0
PrimaryDamageRadius = 10.0
ScatterRadiusVsInfantry = 20.0 ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
SecondaryDamage = 5.0
SecondaryDamageRadius = 20.0
AttackRange = 350.0
MinimumAttackRange = 100.0 ;150.0 ; Rockets take some distance to target, and you don't want them to blow up in your face.
MinTargetPitch = -90
MaxTargetPitch = 79
DamageType = EXPLOSION ; ignored for projectile weapons
DeathType = EXPLODED
WeaponSpeed = 200 ; ignored for projectile weapons
ProjectileDetonationFX = WeaponFX_RocketBuggyMissileDetonation
ProjectileObject = InfernoTankShell ; KatyushaRocket TomahawkMissile InfernoTankShell RocketBuggyMissile
ProjectileExhaust = MissileExhaust
VeterancyProjectileExhaust = HEROIC HeroicMissileExhaust
RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
ScatterRadius = 100 ; This weapon will scatter somewhere within a circle of this radius, instead of hitting someone directly
DelayBetweenShots = 100 ; time between shots, msec
ClipSize = 48 ; how many shots in a Clip (0 == infinite)
ClipReloadTime = 12000 ; how long to reload a Clip, msec
AutoReloadsClip = Yes
AutoReloadWhenIdle = 12100 ; If I haven't fired in this long, I will reload on my own (rather than only after the last one is fired)
FireFX = FX_BuggyMissileIgnition
FireSound = RocketBuggyWeapon
ProjectileCollidesWith = STRUCTURES
MissileCallsOnDie = Yes
HistoricBonusTime = 5000
HistoricBonusCount = 3
HistoricBonusRadius = 30
HistoricBonusWeapon = BlackNapalmFirestormSmallCreationWeapon
End
My guess is that the scatter makes it never proc due to the condition not being met? Not sure.
2. I tried Nuke_NuclearTankDeathWeapon as historic weapon on the Inferno Cannon, doesn't work at all... What's causing this?
Extra question:
3. Can I make a unit not fire a specific weapon while contained? Molotov cocktails are nice and all but look kinda silly when thrown out of a Troop Crawler.