View unanswered posts | View active topics It is currently Thu Jan 09, 2025 11:36 pm



Reply to topic  [ 3 posts ] 
 Gib spread relative to velocity. Need help! 
Author Message
User avatar

Joined: Wed Jan 03, 2007 12:48 am
Posts: 163
Reply with quote
Post Gib spread relative to velocity. Need help!
I'm making a directional explosive, and I'm trying to use "Spread = X" on the gibs to make it semi accurate, but whenever I add a spread, it only affects the spread to the right.

If I reduce it, I can fire to the right perfectly but if I explode it upwards, downwards, left, etc. none of the particles will go left outside the spread range.

How can I make the gib spread be set to whatever direction the explosive is moving before it detonates?

I already have OrientToVel = 1 for the explosive itself.
Here's the code.

Code:
AddAmmo = TDExplosive
   PresetName = Frag CG
   Mass = 2
   RestThreshold = -500
   Buyable = 0
   OrientToVel = 1
   HitsMOs = 1
   GetsHitByMOs = 0
   SpriteFile = ContentFile
      FilePath = Coalition.rte/Devices/Cannons/CannonRound.bmp
   FrameCount = 1
   SpriteOffset = Vector
      X = -2
      Y = -2
   EntryWound = AEmitter
      CopyOf = Dent Metal
   ExitWound = AEmitter
      CopyOf = Dent Metal
   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
   JointStrength = 6
   JointStiffness = 0.5
   DrawAfterParent = 1
   StanceOffset = Vector
      X = -12
      Y = -5
   StartThrowOffset = Vector
      X = -12
      Y = -5
   EndThrowOffset = Vector
      X = -12
      Y = -5
   TriggerDelay = 0
   AddGib = Gib
      GibParticle = MOPixel
         CopyOf = Grenade Fragment Gray
      Count = 12
      Spread = 3.14
      LifeVariation = 0.7
//      MaxVelocity = 250
//      MinVelocity = 15
      LifeVariation = 0.5
      InheritsVel = 1
   AddGib = Gib
      GibParticle = MOPixel
         CopyOf = Grenade Fragment Yellow
      Count = 8
      Spread = 3.14
      LifeVariation = 0.7
//      MaxVelocity = 270
//      MinVelocity = 25
      LifeVariation = 0.5
      InheritsVel = 1
   AddGib = Gib
      GibParticle = MOSParticle
         CopyOf = Explosion Smoke 1
         InstanceName = Cannon Smoke 1
         AirResistance = 0.5
      Count = 2
      Spread = 3.14
      MaxVelocity = 40
      MinVelocity = 5
      LifeVariation = 0.5
      InheritsVel = 1
   AddGib = Gib
      GibParticle = MOSParticle
         CopyOf = Explosion Smoke 2
         InstanceName = Cannon Smoke 2
         AirResistance = 0.4
      Count = 2
      Spread = 3.14
      MaxVelocity = 40
      MinVelocity = 5
      LifeVariation = 0.5
      InheritsVel = 1
   AddGib = Gib
      GibParticle = MOSParticle
         CopyOf = Explosion Smoke 1
         InstanceName = Cannon Smoke 3
         AirResistance = 0.3
      Count = 2
      Spread = 3.14
      MaxVelocity = 40
      MinVelocity = 5
      LifeVariation = 0.50
      InheritsVel = 1
   AddGib = Gib
      GibParticle = MOSParticle
         CopyOf = Explosion Smoke 2
         InstanceName = Cannon Smoke 4
         AirResistance = 0.2
      Count = 2
      Spread = 3.14
      MaxVelocity = 40
      MinVelocity = 5
      LifeVariation = 0.50
      InheritsVel = 1
   GibImpulseLimit = 1

AddAmmo = Round
   PresetName = Round CG
   ParticleCount = 1
   Particle = TDExplosive
      CopyOf = Frag CG
   Shell = None
   FireVelocity = 100
   ShellVelocity = 10
   Separation = 5


Last edited by AGENT15 on Fri Jun 12, 2009 6:44 pm, edited 5 times in total.



Thu Jun 11, 2009 12:36 am
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Spread relative to velocity
InheritsVel?


Thu Jun 11, 2009 12:46 am
Profile
User avatar

Joined: Wed Jan 03, 2007 12:48 am
Posts: 163
Reply with quote
Post Re: Spread relative to velocity
Yeah, I have that too. I added the code so everything is laid out, maybe you can spot the problem.


I did some testing and it seems that inheritsvel will somewhat conflict with spread, so even though if I shoot left, the particles will be moving left, they will still only be shot in a reverse "C" shape, and a certain range will be left gibless.


Thu Jun 11, 2009 1:00 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: Google [Bot]


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.047s | 14 Queries | GZIP : Off ]