Data Realms Fan Forums
http://45.55.195.193/

Shell ejection direction
http://45.55.195.193/viewtopic.php?f=1&t=45993
Page 1 of 1

Author:  WobbaWoo [ Mon Sep 21, 2015 1:09 am ]
Post subject:  Shell ejection direction

Is there a simple way to control the direction that shells are directed in? From my understanding this can't be done with ShellSpreadRange or ShellAngVelRange, and I wanted to have a forward-ejecting weapon.

Author:  CaveCricket48 [ Mon Sep 21, 2015 2:34 am ]
Post subject:  Re: Shell ejection direction

You should see a ShellVelocity variable in the Round definition. Make the value negative to make shells eject forward.

Author:  WobbaWoo [ Mon Sep 21, 2015 2:56 am ]
Post subject:  Re: Shell ejection direction

Thanks.

Author:  numanair [ Mon Dec 21, 2015 9:13 pm ]
Post subject:  Re: Shell ejection direction

I was just trying to find an answer to this. Is there a way to make them eject at a specific angle?

Author:  numanair [ Tue Dec 22, 2015 12:17 am ]
Post subject:  Re: Shell ejection direction

BlueComet24 and I found a solution!
Use an invisible AEmitter as a casing to spawn a copy of the actually visible casing with each shot. EmissionAngle sets the direction of the casings.
The SpriteOffset of the AEmitter changes the location of the emitted casings.
Code:
AddAmmo = AEmitter
   PresetName = P90 Casing Emitter
   LifeTime = 1
   Mass = 0
   GlobalAccScalar = 0
   RestThreshold = -500
   HitsMOs = 0
   GetsHitByMOs = 0
   SpriteFile = ContentFile
      FilePath = Base.rte/Null.bmp //Invisible AEmitter
   FrameCount = 1
   OrientToVel = 0
   SpriteOffset = Vector //Changes ejection position
      X = -13
      Y = 0
   AtomGroup = AtomGroup
      AutoGenerate = 1
      Material = Material
         CopyOf = Military Stuff
      Resolution = 2
      Depth = 0
   DeepGroup = AtomGroup
      AutoGenerate = 1
      Material = Material
         CopyOf = Military Stuff
      Resolution = 4
      Depth = 1
   DeepCheck = 1
   AddEmission = Emission
      EmittedParticle = MOSParticle
         CopyOf = Casing //Ejected shell. It's what you actually see.
      BurstSize = 1
      Spread = 0.1
      MaxVelocity = 10 //Shell max velocity
      MinVelocity = 8 //Shell min velocity
      PushesEmitter = 0
      InheritsVel = 1
   EmissionEnabled = 1
   EmissionsIgnoreThis = 1
   EmissionAngle = Matrix
      AngleDegrees = 270 //Ejects straight down. Adjust shell emission angle here.
   EmissionOffset = Vector //Keep 0,0. Does not mirror.
      X = 0
      Y = 0
   ParticlesPerMinute = 1 //1 shell per AEmitter per bullet
   BurstScale = 1
   BurstDamage = 0
   BurstTriggered = 1
   EmissionDamage = 0
   FlashOnlyOnBurst = 0
   GibImpulseLimit = 1
   GibWoundLimit = 1

AddAmmo = Round
   PresetName = Round P90
   ParticleCount = 1
   Particle = MOPixel
      CopyOf = Bullet P90
   Shell = AEmitter //AEmitter instead of the usual MOSParticle
      CopyOf = P90 Casing Emitter //The AEmitter defined above
   FireVelocity = 75
   ShellVelocity = 0 //Set to 0. Velocity of AEmitter.
   Separation = 0

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/