View unanswered posts | View active topics It is currently Thu Apr 18, 2024 8:23 pm



Reply to topic  [ 7 posts ] 
 A script that damages weapons when we uses it? 
Author Message
Banned

Joined: Wed Aug 01, 2012 1:07 pm
Posts: 28
Reply with quote
Post A script that damages weapons when we uses it?
I really need that,I can't code in lua cause I'm lua illiterate,

some one can help me?

I request a script that damages weapons when you fires with.
a wound per 5 shots,to make the guns not durable,for a survival map.


Thu Aug 02, 2012 4:29 pm
Profile
User avatar

Joined: Wed May 20, 2009 3:10 pm
Posts: 366
Location: Århus, Denmark
Reply with quote
Post Re: A script that damages weapons when we uses it?
I can script it for you.

Should it have recoil similar to my trappers weapons, as I imaging that it would fit your apocalyptic theme?


Thu Aug 02, 2012 5:44 pm
Profile
Banned

Joined: Wed Aug 01, 2012 1:07 pm
Posts: 28
Reply with quote
Post Re: A script that damages weapons when we uses it?
you sprite very vell,

you code very well,

you code lua too?

you're the datarealms god?

hell yes I accept you code that!

and no,no recoil please!


Thu Aug 02, 2012 5:47 pm
Profile
User avatar

Joined: Wed May 20, 2009 3:10 pm
Posts: 366
Location: Århus, Denmark
Reply with quote
Post Re: A script that damages weapons when we uses it?
Here are the scripts.

You will need to make a MOPixel with a mass of about 0.001 kg and then write the name of this MOPixel instead of "Laser Damage" that is in about line 90

The "Auto" script will be for your auto weapons and the "semiauto" will be for your semiautos of course.

There are some properties you play around with in the start of each script.

Some that may not be so obvious,

self.Durability is the number of shots it takes for the device to take damage

self.MaxTurn is the amount it can rotate before you drop the gun. A pistol should have about 2, a smg should have about 1.3, an assault rifle should have about 0.9 and a sniper rifle should have about 0.5.


Attachments:
SemiAuto.lua [4.33 KiB]
Downloaded 210 times
Auto.lua [4.21 KiB]
Downloaded 211 times
Thu Aug 02, 2012 7:11 pm
Profile
Banned

Joined: Wed Aug 01, 2012 1:07 pm
Posts: 28
Reply with quote
Post Re: A script that damages weapons when we uses it?
You're my god aw yeah!
but that script seems a bit hard to mod.
I have just wanted a script that make one wound per 5 shots :/


Thu Aug 02, 2012 7:21 pm
Profile
User avatar

Joined: Wed May 20, 2009 3:10 pm
Posts: 366
Location: Århus, Denmark
Reply with quote
Post Re: A script that damages weapons when we uses it?
N4K4T0V wrote:
You're my god aw yeah!
but that script seems a bit hard to mod.
I have just wanted a script that make one wound per 5 shots :/


Just play around with the variables

Code:
  --You may change following variables to your likings
  self.ParticleMass = 1 --Mass of the projectile fired
  self.ParticleVel = 90 --speed of the projectile fired
  self.RecoilMulti = 1 --if for some reason you need to change the recoil without changing mass or velocity use this
  self.Grip = 1 --This is how fast you regain control
  self.MaxTurn = 2
  self.MovementPunisherment = 1
  self.Durability = 5


But here are the versions of the scripts without recoil, which are simpler


Edit: Sorry, didn't see you didn't want recoil


Attachments:
Auto.lua [906 Bytes]
Downloaded 210 times
SemiAuto.lua [980 Bytes]
Downloaded 196 times
Thu Aug 02, 2012 7:44 pm
Profile
Banned

Joined: Wed Aug 01, 2012 1:07 pm
Posts: 28
Reply with quote
Post Re: A script that damages weapons when we uses it?
No worries about recoil I have maded an edit,that's why you don't seen I don't need recoil.


Thu Aug 02, 2012 8:06 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 7 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.042s | 18 Queries | GZIP : Off ]