View unanswered posts | View active topics It is currently Wed Dec 25, 2024 7:25 pm



Reply to topic  [ 5 posts ] 
 Shell ejection direction 
Author Message
User avatar

Joined: Thu Jul 17, 2014 5:44 am
Posts: 15
Reply with quote
Post 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.


Mon Sep 21, 2015 1:09 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: Shell ejection direction
You should see a ShellVelocity variable in the Round definition. Make the value negative to make shells eject forward.


Mon Sep 21, 2015 2:34 am
Profile
User avatar

Joined: Thu Jul 17, 2014 5:44 am
Posts: 15
Reply with quote
Post Re: Shell ejection direction
Thanks.


Mon Sep 21, 2015 2:56 am
Profile

Joined: Sun Oct 07, 2012 3:24 am
Posts: 28
Reply with quote
Post 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?


Mon Dec 21, 2015 9:13 pm
Profile

Joined: Sun Oct 07, 2012 3:24 am
Posts: 28
Reply with quote
Post 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


Tue Dec 22, 2015 12:17 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.071s | 14 Queries | GZIP : Off ]