Posted by: brncao - Sunday, September 25, 2011 9:26:08 AM
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.
Posted by: NewNightmare - Sunday, September 25, 2011 11:48:37 AM
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
Posted by: Annihilationzh - Sunday, September 25, 2011 12:31:59 PM
As it's a tank, you may have issues with turret pitch. I'd have to see the code to comment further.
Posted by: NewNightmare - Sunday, September 25, 2011 2:06:33 PM
Ani, its a rocket, Humv's rocket doesnt need pitch, yet it fires at the sky
[code]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[/code]
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
[code] WeaponSet
Conditions = PLAYER_UPGRADE
Weapon = PRIMARY HumveeGun
Weapon = SECONDARY HumveeMissileWeapon
Weapon = TERTIARY HumveeMissileWeaponAir
PreferredAgainst = TERTIARY AIRCRAFT
End[/code]
Posted by: brncao - Sunday, September 25, 2011 6:11:31 PM
"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.
Posted by: NewNightmare - Monday, September 26, 2011 2:22:55 AM
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).
Posted by: Annihilationzh - Monday, September 26, 2011 11:07:32 AM
[quote]Ani, its a rocket, Humv's rocket doesnt need pitch, yet it fires at the sky[/quote]
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.
Posted by: NewNightmare - Tuesday, September 27, 2011 5:07:10 AM
[quote]humvee doesn't[/quote]
[quote]Tanks DO [/quote]
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
[code]
AIUpdateInterface
Turret
AllowsPitch = Yes
TurretPitchRate = 999999
ControlledWeaponSlots = TheOneWithRockets
End
End
[/code]
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...
Posted by: brncao - Saturday, October 1, 2011 9:56:09 AM
[quote=newnightmare]A10 thunderbolt has its launch bones setup badly in the W3D file (rotated towards the side of a plane)[/quote]
Were you able to fix it?