Data Realms Fan Forums
http://45.55.195.193/

Very weird problem...
http://45.55.195.193/viewtopic.php?f=1&t=19658
Page 1 of 1

Author:  Awesomeness [ Thu Sep 02, 2010 1:33 am ]
Post subject:  Very weird problem...

So, for Sweet Dreams I have multiple missions, and my checkpoints Lua scripts (called save stones in-campaign) have to communicate with the mission itself to work. So, I have to have different Lua scripts that use different mission names to communicate. (SweetDreams, SweetDreams2, etc.) But, the Lua isn't the problem. So, to make multiple checkpoints, I had to make several MOSRotatings (Checkpoint, Checkpoint 2) that used multiple different Lua scripts.

The problem is, When I create Checkpoint 2 in the ini, even when I try to create just Checkpoint, not Checkpoint 2, (via Lua) it makes Checkpoint 2! I can tell because the checkpoint keeps giving errors from Checkpoint 2.lua! If I try to make Checkpoint 2, it makes Checkpoint 2 just fine though. If I remove Checkpoint 2 from the ini, it'll make a normal Checkpoint just fine. In fact, I tested, what ever I name Checkpoint, it always creates Checkpoint 2!

Sorry if this is ridiculously confusing. Does anyone know what's wrong?

EDIT: Since no-one's replying, here's the gist: I have a checkpoint. I have to make multiple different types of checkpoints. But whenever I make a second type, no matter what, even if I try to make the first, it always makes the second. How do I fix this?

Author:  CaveCricket48 [ Thu Sep 02, 2010 10:06 pm ]
Post subject:  Re: Very weird problem...

If you're using a "CopyOf = Checkpoint" to create "Checkpoint 2", make sure Checkpoint 2's PresetName is after the CopyOf line.

Edit: PresetName lines should be after CopyOf lines in general.

Author:  411570N3 [ Fri Sep 03, 2010 7:38 am ]
Post subject:  Re: Very weird problem...

Anything you want to keep will have to be after the CopyOf, otherwise the CopyOf just overwrites it.

Author:  Coops [ Fri Sep 03, 2010 9:10 am ]
Post subject:  Re: Very weird problem...

411570N3 wrote:
Anything you want to keep will have to be after the CopyOf, otherwise the CopyOf just overwrites it.


Not the entire bit of code.

Whatever is defined in the original Code will stay unless the CopyOf defines it again.
Ex.

Code:
AddEffect = MOSRotating
   PresetName = Soldier Misc Gib A
   Mass = 7.32
   Sharpness = 1
   HitsMOs = 1
   GetsHitByMOs = 1
   SpriteFile = ContentFile
      FilePath = Coalition.rte/Actors/Soldier/MiscGibA.bmp
   FrameCount = 1
   SpriteOffset = Vector
      X = -4
      Y = -4
   AngularVel = 6
   AtomGroup = AtomGroup
      AutoGenerate = 1
      Material = Material
         CopyOf = Flesh
      Resolution = 4
      Depth = 0
   DeepCheck = 0
   AddGib = Gib
      GibParticle = MOPixel
         CopyOf = Drop Blood
      Count = 15
      Spread = 2.25
      MaxVelocity = 15
      MinVelocity = 5
   GibImpulseLimit = 120
   GibWoundLimit = 2


And then you go

Code:
AddEffect = MOSRotating
   CopyOf = Soldier Misc Gib A
   PresetName = Whatever
   Mass = 5
   AddGib = Gib
      GibParticle = MOPixel
         CopyOf = Drop Blood
      Count = 15
      Spread = 2.25
      MaxVelocity = 15
      MinVelocity = 5


Then the Mass of the New MOSRotating will change but the original Gib will stay and the newly defined MOSRotating will Gib that and whats defined in the new one.

Hope that helps.

Author:  411570N3 [ Fri Sep 03, 2010 9:18 am ]
Post subject:  Re: Very weird problem...

Right. Yeah, that's what I meant. Sorry for any misunderstandings that may have caused.

Author:  Awesomeness [ Fri Sep 03, 2010 12:30 pm ]
Post subject:  Re: Very weird problem...

Hey, I never used copyof in my ini at all. I realized that would have been a smart idea and I tried it; no difference. I'll just make one type of checkpoint with really complex code that checks which mission it's in via mass to do it... (Each mission will give its checkpoints certain masses when they are spawned)

EDIT: It worked. Thanks anyway!

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