Data Realms Fan Forums
http://45.55.195.193/

In need of small script.
http://45.55.195.193/viewtopic.php?f=75&t=19338
Page 1 of 1

Author:  Darkdoom [ Tue Jul 27, 2010 2:00 am ]
Post subject:  In need of small script.

I would like a Lua script that makes a normal, stupid, crab appear in front of my gun when I fire, and of course, not have a bullet behind it that would hurt my poor crab before it smashes into something and dies in a more horrible way.

I wasnt exactly sure where to put this but it is a request so im gonna drop it here.

PS: I can put in any offsets and speeds, I just need the bare bones so to speak.

Author:  Kyred [ Tue Jul 27, 2010 4:34 am ]
Post subject:  Re: In need of small script.

Attach this script to an MOPixel. It will create a crab at the pixel's position and then delete the pixel.
Code:
function Create(self)
     local crab = CreateACrab("Crab");
     crab.Pos = self.Pos;
     crab.Vel = Vector(0,0);
     MovableMan:AddActor(crab);
     self.ToDelete = true;
end

Author:  dragonxp [ Tue Jul 27, 2010 5:14 am ]
Post subject:  Re: In need of small script.

Couldnt you just copy my Ronin Cannon's code and us eini to emit a crab from an emitter fire from a gun?

Author:  BrainChild [ Tue Jul 27, 2010 1:38 pm ]
Post subject:  Re: In need of small script.

Also if you need more scripts just post here

Author:  Darkdoom [ Tue Jul 27, 2010 9:06 pm ]
Post subject:  Re: In need of small script.

Awsome! thanks guys!

I will probobly just dump the gun in the minor mod dump when im done though.
now, as an example in the Pistol ini code, where would this go. You said the MoPixel but I cant exactly find that... since there are multiple ones...
I feel like such a noob

EDIT: oh, and to attach it you use
Code:
ScriptFile = yaddayadda.lua

right? Or am just completely incompetent D:

Author:  BrainChild [ Tue Jul 27, 2010 9:27 pm ]
Post subject:  Re: In need of small script.

Yeah thats right you attach it to the MOPixel that the gun fires I think

Author:  Darkdoom [ Tue Jul 27, 2010 9:36 pm ]
Post subject:  Re: In need of small script.

that is somewhere in here:
Code:
AddAmmo = Magazine
   PresetName = Magazine CrabGun
   Mass = 1 // kg
   HitsMOs = 0
   GetsHitByMOs = 0
   SpriteFile = ContentFile
      FilePath = CrabGun.rte/Gun/CrabGunCasing.bmp
   FrameCount = 1
   SpriteOffset = Vector
      X = -3
      Y = -3
   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 = 3
      Depth = 1
   DeepCheck = 0
   JointStrength = 200
   JointStiffness = 1
   JointOffset = Vector
      X = 0
      Y = -3
   DrawAfterParent = 0
   RoundCount = -1
   RTTRatio = 0
   RegularRound = None
   TracerRound = None

right?

Im probobly looking at it and not seeing it lol.

Author:  BrainChild [ Wed Jul 28, 2010 1:33 pm ]
Post subject:  Re: In need of small script.

Not there , go to the addammo = round then find the MOPixel that the round is made of attach that to that Pixel

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