thetimn8er
  • thetimn8er
  • 50.25% (Neutral)
  • Private Topic Starter
12 years ago
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.

UserPostedImage 
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:

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
Sponsor
Annihilationzh
12 years ago
Are they firing from the correct bone? This usually happens because the projectiles don't have enough height.

Also, the AA gun takes no damage for unknown reasons.


Weapons don't damage the user unless SELF SUICIDE is specified in the radiusdamageeffects.
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.
thetimn8er
  • thetimn8er
  • 50.25% (Neutral)
  • Private Topic Starter
12 years ago

Are they firing from the correct bone? This usually happens because the projectiles don't have enough height.

Originally Posted by: Annihilationzh 



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
WeaponFireFXBone  = PRIMARY MUZZLE
WeaponMuzzleFlash = PRIMARY MUZZLEFX

This is confusing to me, as there are no bones in the model called MUZZLE, or MUZZLEFX...
CommieDog
12 years ago
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.
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
thetimn8er
  • thetimn8er
  • 50.25% (Neutral)
  • Private Topic Starter
12 years ago

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.

Originally Posted by: CommieDog 



Ah, is it because the weapon uses a projectile object? It works perfectly now, thank you!