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



Reply to topic  [ 21 posts ]  Go to page Previous  1, 2
 Gun Coding 
Author Message
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post Re: Gun Coding
Really? I thought that during SpriteOffset the X axis was inverted... wait I'll check. No wait, I just read the offset tutorial again, it makes sense now.


Sun Apr 12, 2009 12:36 pm
Profile WWW
User avatar

Joined: Mon Feb 11, 2008 4:45 am
Posts: 69
Reply with quote
Post Re: Gun Coding
How exactly do I upload my mod?

Edit: I think I'm getting it now, I'm getting errors that are actually telling me what's wrong. I just need to fill in the X's and the Y's and all that jazz, and I think I got it. Thanks for the help!

Edit2: I'm getting errors at line 22, which is Resolution. How do I fix this?


Sun Apr 12, 2009 6:30 pm
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: Gun Coding
its probably given you the wrong line, have you used /* */ commenting anywhere in your code?
also, to upload your mod, archive it (.zip, .rar, whatever) and use the upload function in your post.


Mon Apr 13, 2009 1:31 am
Profile WWW
User avatar

Joined: Sun Apr 05, 2009 11:03 am
Posts: 17
Location: Amsterdam, NL
Reply with quote
Post Re: Gun Coding
I had some problems with Resolution too, but then I changed it to 1 and it worked(dunno what it means, but it worked.)
here are a few lines of code from my first gun, try just retyping it without the descriptions(things behind / /.)and mind the capitalization.
Code:
   SpriteOffset = Vector //gun's center, search "offset" on wiki for more info
      X = -20
      Y = -6
   JointOffset = Vector // also on offset wiki
      X = -18
      Y = -1
   SupportOffset = Vector // "
      X = 7
      Y = -2
   AtomGroup = AtomGroup // is needed for some reason.
      AutoGenerate = 1
      Material = Material
         CopyOf = Military Stuff
      Resolution = 1
      Depth = 0
   Magazine = Magazine
      CopyOf = Magazine SMG // Magazine Pistol works just the same
      ParentOffset = Vector // where the magazine is placed.
         X = 9
         Y = 0
   RateOfFire = 150 //self-explaining.
   ReloadTime = 1380 //this is about 2.1 seconds
   FullAuto = 1 // makes it fully automatic or semi-automatic
   FireIgnoresThis = 1 // I guess this makes the weapon unhittable?
   ShakeRange = 1 //how much the gun shakes, spreading the bullets
   SharpShakeRange = 1 // the same, but when aiming down sights
   ParticleSpreadRange = 0 // makes the bullets spread too, in some way
   MuzzleOffset = Vector // where it shoots from.
      X = 19
      Y = -3
   GoldValue = 28 // how much it costs
   SharpLength = 230 // how far it aims
   AddToGroup = Awesomeness //in which tab it's placed.


berhaps I explained some things wrong, but i'm a starting coder myself too, I only made 1 weapon yet.
(though if you want some sprites, i'm your man :P)

Greetings,
Bibo

P.S. maybe your sprite isn't drawn in the CC palette colors? :???:


Tue Apr 14, 2009 4:13 pm
Profile
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post Re: Gun Coding
That wouldn't cause a crash, but make it invisible when facing left and a bunch of lines when facing right.


Wed Apr 15, 2009 2:18 am
Profile WWW
User avatar

Joined: Sun Apr 05, 2009 11:03 am
Posts: 17
Location: Amsterdam, NL
Reply with quote
Post Re: Gun Coding
oh. well, now i know that too.


Wed Apr 15, 2009 5:13 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 21 posts ]  Go to page Previous  1, 2

Who is online

Users browsing this forum: Google [Bot]


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.032s | 16 Queries | GZIP : Off ]