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



Reply to topic  [ 8 posts ] 
 In need of small script. 
Author Message
User avatar

Joined: Mon Jun 28, 2010 10:06 pm
Posts: 461
Location: STEPPING INTO THE RING
Reply with quote
Post 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.


Tue Jul 27, 2010 2:00 am
Profile
User avatar

Joined: Sun May 31, 2009 1:04 am
Posts: 308
Reply with quote
Post 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


Tue Jul 27, 2010 4:34 am
Profile
User avatar

Joined: Wed Sep 09, 2009 3:16 am
Posts: 3032
Location: Somewhere in the universe
Reply with quote
Post 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?


Tue Jul 27, 2010 5:14 am
Profile
User avatar

Joined: Sun May 23, 2010 7:11 pm
Posts: 193
Reply with quote
Post Re: In need of small script.
Also if you need more scripts just post here


Tue Jul 27, 2010 1:38 pm
Profile
User avatar

Joined: Mon Jun 28, 2010 10:06 pm
Posts: 461
Location: STEPPING INTO THE RING
Reply with quote
Post 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:


Tue Jul 27, 2010 9:06 pm
Profile
User avatar

Joined: Sun May 23, 2010 7:11 pm
Posts: 193
Reply with quote
Post Re: In need of small script.
Yeah thats right you attach it to the MOPixel that the gun fires I think


Tue Jul 27, 2010 9:27 pm
Profile
User avatar

Joined: Mon Jun 28, 2010 10:06 pm
Posts: 461
Location: STEPPING INTO THE RING
Reply with quote
Post 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.


Tue Jul 27, 2010 9:36 pm
Profile
User avatar

Joined: Sun May 23, 2010 7:11 pm
Posts: 193
Reply with quote
Post 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


Wed Jul 28, 2010 1:33 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 8 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.034s | 13 Queries | GZIP : Off ]