brncao
  • brncao
  • 71% (Friendly)
  • Captain Topic Starter
14 years ago
In shockwave mod, how do you make the mammoth tusks shoot air units? I tried to set antiairbornevehicle = yes in the weapon.ini but it didn't work. The missiles won't fly upward.
Sponsor
NewNightmare
14 years ago
Armorgeneral's ini file > mammoth code > Weaponset > rockets > look if there's a PreferredAgainst line with the weaponslot with rockets in them, (e.g. PreferredAgainst = Secondary Vehicles, where Weapon = Secondary Rockets) if so, either delete or add 'aircraft' to it. keep the line in weapon.ini
Annihilationzh
14 years ago
As it's a tank, you may have issues with turret pitch. I'd have to see the code to comment further.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
NewNightmare
14 years ago
Ani, its a rocket, Humv's rocket doesnt need pitch, yet it fires at the sky
Weapon HumveeMissileWeaponAir
  PrimaryDamage = 50.0            
  PrimaryDamageRadius = 5.0      
  ScatterRadiusVsInfantry = 10.0     ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
  AttackRange = 320.0
  DamageType = EXPLOSION          ; ignored for projectile weapons
  DeathType = EXPLODED
  WeaponSpeed = 600               ; ignored for projectile weapons
  ProjectileDetonationFX = WeaponFX_RocketBuggyMissileDetonation
  ProjectileObject            = PatriotMissile
  ProjectileExhaust = MissileExhaust
  RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
  DelayBetweenShots = 1000  ; time between shots, msec
  ClipSize = 1            ; how many shots in a Clip (0 == infinite) ; You have to have a clip size as a missile weapon
  ClipReloadTime = 2000    ; how long to reload a Clip, msec
  AutoReloadsClip = Yes 
  FireSound = HumveeWeaponTOW
  ProjectileDetonationFX = WeaponFX_RocketBuggyMissileDetonation
  AntiAirborneVehicle         = Yes
  AntiAirborneInfantry        = No
  AntiGround = No

  ; 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
End
base your code on that and everything should go fine (notice = if you wanna make it for both, ground and air, change to the obvious at the bottom)

EDIT

Further help - weapon set extracted from AmericaVehicle.ini
  WeaponSet
    Conditions = PLAYER_UPGRADE 
    Weapon = PRIMARY HumveeGun
    Weapon = SECONDARY HumveeMissileWeapon
    Weapon = TERTIARY HumveeMissileWeaponAir
    PreferredAgainst = TERTIARY     AIRCRAFT
  End
brncao
  • brncao
  • 71% (Friendly)
  • Captain Topic Starter
14 years ago
"PreferredAgainst" does not mean it will give it the property to shoot upwards if you add Aircraft to it. PreferredAgainst is used to separate the roles of Primary, Secondary, and Tertiary so it automatically uses that weapon to target certain units. If it's left out, then by default it will fire the weapon at any targets assuming the parameters allow it.

I'm looking at the Advanced Crusader (Wraith Tank), and I'm scratching my head over this.

I remember I got it to work a long time ago, but I don't remember how.

Edit: Problem solved. I just removed ScatterRadius. Come to think of it, didn't you have problems with the A10 thunderbolt missiles not flying straight? Try removing ScatterRadius.
NewNightmare
14 years ago
A10 thunderbolt has its launch bones setup badly in the W3D file (rotated towards the side of a plane),
What I meant by the preferred against was: IF there was a line telling the rockets to fire at vehicles or infantry, he would never launch them vs aircraft (look at the humv, it has both, AntiAirborneVehicle = Yes and PreferredAgainst = TERTIARY AIRCRAFT in their weapon.ini and americavehicle.ini respectively. I guess thats all the requirements)

EDIT

I've tested the scatterradius on my anders tank, and it aims and shoots at the air units, but deals no damage, so it can't be used effectively (maybe with a Fireweaponwhendead in the projectile it would work).
Annihilationzh
14 years ago

Ani, its a rocket, Humv's rocket doesnt need pitch, yet it fires at the sky


The humvee doesn't have pitch limiting. Tanks DO have pitch limits. Thus many tanks can't fire at certain angles.

You read exactly the opposite of what I meant. It doesn't matter anyway, because his problem is solved.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
NewNightmare
14 years ago

humvee doesn't


Tanks DO


how does the game see the difference ? Kindof = VEHICLE is vehicle,
I know what you meant, but still, pitch limits are determined in exact weapon code, and the

AIUpdateInterface
  Turret
    AllowsPitch = Yes 
    TurretPitchRate = 999999
    ControlledWeaponSlots = TheOneWithRockets
  End
End
is not necessary since the rocket (ProjectileObject) behavior is (or at least should be imo) determined by the locomotor in its own code(as stated by EA coders: " ; ignored for projectile weapons"); hence making it possilbe to fire from an angle parallel to the ground, and then just follow the target (PreferredHeight, turnspeed, lockon etc.) And from what I can remember, the PatriotMissile has its own loco.

P.S. don't you need the TurretPitch = x in W3Dmodeldraw to make the model pitch anyway?
P.P.S. this ScatterRadius bug was the strangest I've met in my modding career so far...
brncao
  • brncao
  • 71% (Friendly)
  • Captain Topic Starter
14 years ago

A10 thunderbolt has its launch bones setup badly in the W3D file (rotated towards the side of a plane)

newnightmare wrote:


Were you able to fix it?