View unanswered posts | View active topics It is currently Sat Dec 28, 2024 1:20 am



Reply to topic  [ 9 posts ] 
 How should I make a stationary MOPixel? 
Author Message
User avatar

Joined: Sun Dec 25, 2011 7:23 am
Posts: 269
Reply with quote
Post How should I make a stationary MOPixel?
Currently, I have a TDExplosive that gibs into a single MOPixel (which will be scripted to do stuff, but that's something else). Only problem is that whenever I set the velocity of the gibbed MOPixel to zero, the MOPixel just disappears (I can tell since I gave the pixel a huge glow halo).
I'm pretty sure it isn't the LifeTime or RestThreshold since I have both of them set to 10000 (10 seconds).
I did set GlobalAccScalar = 0 if that matters.
This problem doesn't seem to occur if I use any other particle (AEmitter, MOSRotating, MOSParticle ect.), only for MOPixels.

An alternative solution to this is if someone can tell or show me how to attach a glow to anything other than a MOPixel.

Thanks


Fri Jan 06, 2012 5:21 pm
Profile
User avatar

Joined: Fri Feb 16, 2007 8:43 pm
Posts: 1695
Location: AH SHIT FUCK AUGH
Reply with quote
Post Re: How should I make a stationary MOPixel?
Try removing the RestThreshold line altogether (i doubt it will have any effect, but hey), and set AirResistance = 1 (add the line anywhere if it isn't there). The latter makes anything utterly and totally immobile. If that doesn't work, show the relevant piece of INI, people can be more useful that way. :-o


Fri Jan 06, 2012 9:55 pm
Profile WWW
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3138
Location: A little south and a lot west of Moscow
Reply with quote
Post Re: How should I make a stationary MOPixel?
MOPixels (and MOSParticles) erase themselves, actually. It's kind of annoying, but you can deal with it with Lua. Just add this script to it:
Code:
function Update(self)
    self.ToDelete = false;
    self.ToSettle = false;
    self.Age = 0;
end

The script is untested, but it should do the trick. :)


Fri Jan 06, 2012 10:31 pm
Profile WWW
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post Re: How should I make a stationary MOPixel?
Wait a minute, what do you mean with "erase themselves"?

Also, pinning it wouldn't have solved it?


Sat Jan 07, 2012 1:47 am
Profile
User avatar

Joined: Sun Dec 25, 2011 7:23 am
Posts: 269
Reply with quote
Post Re: How should I make a stationary MOPixel?
What does pinning (and if related, pin strength) do?


Sat Jan 07, 2012 4:33 am
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post Re: How should I make a stationary MOPixel?
PinStrength pins an object, literally. It'll stay were it was spawned. Now, the value you set the PinStrength is how much force you need to use to un-pin said object.

For example, if I pin an object with PinStrength = 10, and then I throw a flying dreadnought at it, the object should get un-pinned. Keep in mind that if the strength is higher than the GibImpulseLimit the object will gib before un-pinning (or it will un-pin and then gib, I don't know really). For example, when you shoot a brain case with a mass oriented weapon like the revolver cannon.


Sat Jan 07, 2012 4:49 am
Profile
User avatar

Joined: Sun Dec 25, 2011 7:23 am
Posts: 269
Reply with quote
Post Re: How should I make a stationary MOPixel?
TheLastBanana wrote:
MOPixels (and MOSParticles) erase themselves, actually. It's kind of annoying, but you can deal with it with Lua. Just add this script to it:
Code:
function Update(self)
    self.ToDelete = false;
    self.ToSettle = false;
    self.Age = 0;
end

The script is untested, but it should do the trick. :)

Thanks for the tip, but the MOPixel keeps disappearing anyways

Here's the code for the MOPixel

Code:
AddEffect = MOPixel
   PresetName = Time Particle
   Mass = 0.001
   PinStrength = 1
   AirResistance = 1
   GlobalAccScalar = 0
   Sharpness = 0
   LifeTime = 10000
   RestThreshold = 10000
   HitsMOs = 0
   GetsHitByMOs = 0
   ScriptPath = TimeSphere.rte/SlowMo.lua
   Color = Color
      R = 125
      G = 225
      B = 225
   Atom = Atom
      Material = Material
         CopyOf = Air
      TrailColor = Color
         R = 255
         G = 255
         B = 255
      TrailLength = 0
[i]bit of coding for the glow but that's not important[/i]

And here's the code for the TDExplosive
Code:
AddDevice = TDExplosive
   PresetName = Time Bomb
   Description = Deals no damage, but slows down everything in its explosion radius.
   AddToGroup = Bombs
   Mass = 2
   RestThreshold = -500
   HitsMOs = 1
   GetsHitByMOs = 1
   SpriteFile = ContentFile
      FilePath = TimeSphere.rte/Sprites/HourGlass.bmp
   FrameCount = 1
   SpriteOffset = Vector
      X = -3.5
      Y = -5.5
   EntryWound = AEmitter
      CopyOf = Dent Metal No Spark
   ExitWound = AEmitter
      CopyOf = Dent Metal No Spark
   GoldValue = 18
   AngularVel = 7[/color]
   AtomGroup = AtomGroup
      AutoGenerate = 1
      Material = Material
         CopyOf = Military Stuff
      Resolution = 2
      Depth = 2
   DeepGroup = AtomGroup
      AutoGenerate = 1
      Material = Material
         CopyOf = Military Stuff
      Resolution = 4
      Depth = 10
   DeepCheck = 0
   JointStrength = 65
   JointStiffness = 0.5
   JointOffset = Vector
      X = 0
      Y = 2
   DrawAfterParent = 0
   StanceOffset = Vector
      X = 8
      Y = 5
   StartThrowOffset = Vector
      X = -12
      Y = -5
   EndThrowOffset = Vector
      X = 12
      Y = -5
   MinThrowVel = 5
   MaxThrowVel = 22
   TriggerDelay = 3000
   ActivatesWhenReleased = 0
   EffectOnGib = 1
   EffectAlwaysShows = 1
   ScreenEffect = ContentFile
      Path = Base.rte/Effects/Glows/YellowHuge.bmp
   AddGib = Gib
      GibParticle = MOPixel
         CopyOf = Time Particle
      Count = 1
      Spread = 0
      MinVelocity = 0
      MaxVelocity = 0
      InheritsVel = 0
   GibImpulseLimit = 10
   GibWoundLimit = 2


edit: grayed out parts that I'm pretty sure aren't related to the problem, but still put in anyways in case they do make a difference
edit2: realized you can't gray out code
Played around with PinStrength, but I didn't notice anything different.


Sat Jan 07, 2012 4:58 am
Profile
User avatar

Joined: Sun Dec 25, 2011 7:23 am
Posts: 269
Reply with quote
Post Re: How should I make a stationary MOPixel?
Code:
function Update(self)
   if (self.Vel.X = 0) == false then
          self.Vel.X = 0
   end
   if (self.Vel.Y = 0) == false then
          self.Vel.Y = 0
   end
end

edit: scratch that, it's still not working


Sat Jan 07, 2012 5:18 am
Profile
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3138
Location: A little south and a lot west of Moscow
Reply with quote
Post Re: How should I make a stationary MOPixel?
Asklar wrote:
Wait a minute, what do you mean with "erase themselves"?

MOPixels and MOSParticles automatically delete themselves if they're stuck in one place for too long. Like I said, use my script, and they'll stop disappearing. You're correct about PinStrength, though - that'll keep them in place like he wants.


Sat Jan 07, 2012 9:50 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 9 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.136s | 13 Queries | GZIP : Off ]