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



Reply to topic  [ 7 posts ] 
 Attaching a MOPixel as an Emitter to an MOPixel Round 
Author Message

Joined: Wed Mar 07, 2007 1:42 am
Posts: 3
Location: MA
Reply with quote
Post Attaching a MOPixel as an Emitter to an MOPixel Round
I have a device that fires an MOPixel as its Round, and I was hoping to have it emit glowing pixels as a sort of tail. Is there a way to attach the glowing MOPixel to the MOPixel Round as an emitter?

Round:

Code:
 AddAmmo = Round
   PresetName = Round Proton Rifle
   ParticleCount = 1
   Particle = MOPixel
      ScreenEffect = ContentFile
         FilePath = Deus.rte/Daeis Weapons/Proton Rifle/Effects/Proton Hit Glow.bmp
      InstanceName = Particle Proton Rifle
      Mass = 0.03
      RestThreshold = 500
      LifeTime = 450
      Sharpness = 100
      HitsMOs = 1
      GetsHitByMOs = 0
      Color = Color
         R = 105
         G = 252
         B = 105
      Atom = Atom
         Material = Material
            CopyOf = Bullet Metal
         TrailColor = Color
            R = 105
            G = 252
            B = 105
         TrailLength = 4
   Shell = AEmitter
      CopyOf = Shell Proton Rifle
   FireVelocity = 100
   ShellVelocity = 10
   Separation = 0


Pixel that I'm hoping to have emitted as the tail:

Code:
 AddEffect = MOPixel
   PresetName = Proton Glow 1
   Mass = 0.01
   LifeTime = 20
   Sharpness = 0
   HitsMOs = 1
   GetsHitByMOs = 0
   Color = Color
      R = 105
      G = 252
      B = 105
   Atom = Atom
      Material = Material
         CopyOf = Bullet Metal
         PresetName = Proton Energy
         Bounce = -1
      TrailColor = Color
         R = 105
         G = 252
         B = 105
      TrailLength = 0
   ScreenEffect = ContentFile
      FilePath = Deus.rte/Daeis Weapons/Proton Rifle/Effects/Proton Bit Glow.bmp
   EffectStartStrength = 1
   EffectStartTime = 0
   EffectStopStrength = 1
   EffectStopTime = 100
   EffectAlwaysShows = 1


Thanks in advance.


Tue Aug 04, 2009 4:18 am
Profile WWW
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Attaching a MOPixel as an Emitter to an MOPixel Round
Not directly, no.

The simplest way would actually be a lua script; basically creating a timer, then whenever that timer is past X MS, create a particle.

If you can't figure it out I'll drop a script in here.


Tue Aug 04, 2009 4:35 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: Attaching a MOPixel as an Emitter to an MOPixel Round
You can't attach a MOPixel as an AEmitter. It's like researching lizards with a book on mammals. I don't think MOPixels can have attached stuff either. You could have the fired round be an AEmitter that emmits glowing trail particles with very low emission velocities(MinVel, MaxVel) and AirResistance = 1 to keep the trail from moving. The AEmitter can gib on impact and have a few damaging sharp particles.

Edit: Shoot, I got ninja'd for the first time!


Tue Aug 04, 2009 4:41 am
Profile

Joined: Wed Mar 07, 2007 1:42 am
Posts: 3
Location: MA
Reply with quote
Post Re: Attaching a MOPixel as an Emitter to an MOPixel Round
The only problem I've come across with firing an AEmitter is that when you don't babysit your actors they accidentally fire into the ground, and an AEmitter that gibs will just destroy the gun or kill them, whereas a MOPixel won't do them any harm.

How would I write the LUA Script?


Tue Aug 04, 2009 6:33 pm
Profile WWW
User avatar

Joined: Fri Oct 17, 2008 9:46 pm
Posts: 5212
Location: The Grills Locker.
Reply with quote
Post Re: Attaching a MOPixel as an Emitter to an MOPixel Round
You should have searched the forums first. That question was already asked about two hours ago, and was answered. ( By me, by the way.)

Anyway,
Allow me to draw back the curtain... :pipe:
Code:
function Create(self)
   self.timer = Timer();
   trail = CreateMOPixel("Plasma Cutter Trail","Apollocalipse.rte");
   
end


function Update(self)


   if self.timer:IsPastSimMS(10) == true then
      self.timer:Reset();   
      trail = CreateMOPixel("Plasma Cutter Trail","Apollocalipse.rte");
      trail.Pos = self.Pos;            
      MovableMan:AddParticle(trail);
   end      
end

Just replace "plasma cutter trail" with the name of your trail particle, and "Apollocalipse" with the folder of your mod.

EDIT: Also, it's Lua, not LUA.


Wed Aug 05, 2009 1:36 am
Profile WWW
User avatar

Joined: Tue Jul 21, 2009 4:36 am
Posts: 347
Location: The place where asses go to be bad
Reply with quote
Post Re: Attaching a MOPixel as an Emitter to an MOPixel Round
Or, if I am not mistaken, you can do what the Coalition Heavy Sniper does, only have it to where the slug is 1 pixel by 1 pixel, is trailed by a MOPixel emitter, and from there you can add whatever effects you want to it (again, I could be mistaken, so ask a DRL developer).


Fri Aug 07, 2009 3:34 am
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Attaching a MOPixel as an Emitter to an MOPixel Round
Or you could look at the entirely free-to-browse, use, modify, and distribute code that comes with the game.


Fri Aug 07, 2009 2:39 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 7 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.028s | 13 Queries | GZIP : Off ]