Posted by: thetimn8er - Wednesday, July 10, 2013 9:10:03 PM
Hi, when editing my weapon, I noticed a problem that occurs when the vehicle is at a downwards angle in front of a hill. The weapon fires and is blocked by the terrain in front of it, so fires the object in the space the vehicle sits on. [URL=http://imgur.com/O7FCI6l][IMG]http://i.imgur.com/O7FCI6ll.jpg[/IMG][/URL] As you can see, the cannons are firing ahead, but the weaponobject is being detonated at the AA gun. Also, the AA gun takes no damage for unknown reasons. The weapon object: [code=plain] Object Blank ; *** ART Parameters *** Draw = W3DModelDraw ModuleTag_01 DefaultConditionState Model = AVTankShel End End ; ***DESIGN parameters *** DisplayName = OBJECT:TankShell EditorSorting = SYSTEM ArmorSet Armor = ProjectileArmor End VisionRange = 0.0 ; *** ENGINEERING Parameters *** KindOf = PROJECTILE Body = ActiveBody ModuleTag_02 MaxHealth = 100.0 InitialHealth = 100.0 End Behavior = DestroyDie ModuleTag_03 ;nothing End Behavior = DumbProjectileBehavior ModuleTag_04 ; To tweak a Bezier path, please see GS FirstHeight = 10 ; Height of Bezier control points above highest intervening terrain SecondHeight = 10 FirstPercentIndent = 50% ; Percentage of shot distance control points are placed SecondPercentIndent = 90% FlightPathAdjustDistPerSecond = 100 ; Can allow a max speed this can attempt to follow a target. Units are their velocity we can tag. End Behavior = PhysicsBehavior ModuleTag_05 Mass = 0.01 ; we can't have a zero mass, but we want it pretty tiny... End Geometry = Sphere GeometryIsSmall = Yes GeometryMajorRadius = 1.0 Scale = 0.1 End [/code]

Posted by: Annihilationzh - Thursday, July 11, 2013 6:19:32 PM
Are they firing from the correct bone? This usually happens because the projectiles don't have enough height. [quote]Also, the AA gun takes no damage for unknown reasons.[/quote] Weapons don't damage the user unless SELF SUICIDE is specified in the radiusdamageeffects.

Posted by: thetimn8er - Thursday, July 11, 2013 8:29:27 PM
[quote=Annihilationzh;128621]Are they firing from the correct bone? This usually happens because the projectiles don't have enough height.[/quote] I'm a bit of a noob, but from what I see in the model, there are four things called MUZZLEFX01, MUZZLEFX02, MUZZLE01, and MUZZLE02. In the code it uses [code=plain]WeaponFireFXBone = PRIMARY MUZZLE WeaponMuzzleFlash = PRIMARY MUZZLEFX[/code] This is confusing to me, as there are no bones in the model called MUZZLE, or MUZZLEFX...

Posted by: CommieDog - Thursday, July 11, 2013 9:18:45 PM
That's because the code automatically alternates between MUZZLE01 and MUZZLE02. But in order to fix the problem, you need to add WeaponLaunchBone = PRIMARY MUZZLE.

Posted by: thetimn8er - Thursday, July 11, 2013 9:48:45 PM
[quote=CommieDog;128623]That's because the code automatically alternates between MUZZLE01 and MUZZLE02. But in order to fix the problem, you need to add WeaponLaunchBone = PRIMARY MUZZLE.[/quote] Ah, is it because the weapon uses a projectile object? It works perfectly now, thank you!