Author |
Message |
Barnox
Joined: Mon Jun 22, 2009 3:57 pm Posts: 1020
|
Accelerating Sniper Rifle
My request: A sniper rifle, whose shots accelerate. The shots are initially very slow (walking speed), but build up speed until they are very fast indeed. Just regular bullets, if possible. Not like a bazooka round. I'm also thinking, when they travel slowly, gravity would affect them and just pull them down. So, maybe zero-grav bullets?
It is balanced, because at close ranged the bullet is not travelling fast enough to do any real damage. However, at range, where a sniper is meant to be used, it is godly. Like a lightning bolt through the chest/head/leg of your enemy. Maybe more balancing by giving it low sharpness or terrain penetration.
Feel free to make any kind of explaination as to what makes them accelerate. A crazy new element that disregards the laws of momentum?
|
Mon Sep 07, 2009 12:39 pm |
|
|
411570N3
Joined: Wed Jan 07, 2009 10:26 am Posts: 4074 Location: That quaint little British colony down south
|
Re: Accelerating Sniper Rifle
Make sure it caps at a certain velocity. I forgot the velocity at which stuff started disappearing, but make the cap that.
|
Mon Sep 07, 2009 1:08 pm |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: Accelerating Sniper Rifle
function Update(self) self.Vel.Magnitude = self.Vel.Magnitude + 1; end
|
Mon Sep 07, 2009 4:40 pm |
|
|
piipu
Joined: Mon Jun 30, 2008 9:13 pm Posts: 499 Location: Finland
|
Re: Accelerating Sniper Rifle
self.Vel.Magnitude is read only.
|
Mon Sep 07, 2009 4:44 pm |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: Accelerating Sniper Rifle
Well there goes THAT plan.
Could you just multiply Vel by a constant to get a marginally larger vector? Or just split it into Vel.X and Vel.Y and multiply by some speed constant.
|
Mon Sep 07, 2009 4:46 pm |
|
|
piipu
Joined: Mon Jun 30, 2008 9:13 pm Posts: 499 Location: Finland
|
Re: Accelerating Sniper Rifle
Code: self.Vel = self.Vel / self.Vel.Magnitude * (self.Vel.Magnitude + 1) Adds 1 to velocity every frame.
|
Mon Sep 07, 2009 6:14 pm |
|
|
Contrary
Joined: Mon Mar 16, 2009 10:50 pm Posts: 2175 Location: Neverwhere
|
Re: Accelerating Sniper Rifle
Couldn't you simply use negative air friction?
|
Tue Sep 08, 2009 5:19 am |
|
|
411570N3
Joined: Wed Jan 07, 2009 10:26 am Posts: 4074 Location: That quaint little British colony down south
|
Re: Accelerating Sniper Rifle
Doesn't work. They tried in the dummy drunken rocket launcher thread.
|
Tue Sep 08, 2009 7:50 am |
|
|
numgun
Joined: Sat Jan 13, 2007 11:04 pm Posts: 2932
|
Re: Accelerating Sniper Rifle
self.Vel.X = self.Vel.X * 1.1; self.Vel.Y = self.Vel.Y * 1.1;
Multiply speed by 10% extra per frame. Not fancy, but works well.
|
Tue Sep 08, 2009 10:45 am |
|
|
piipu
Joined: Mon Jun 30, 2008 9:13 pm Posts: 499 Location: Finland
|
Re: Accelerating Sniper Rifle
You could just do self.Vel = self.Vel * 1.1 if you prefer unfancyness.
|
Tue Sep 08, 2009 5:56 pm |
|
|
numgun
Joined: Sat Jan 13, 2007 11:04 pm Posts: 2932
|
Re: Accelerating Sniper Rifle
piipu wrote: You could just do self.Vel = self.Vel * 1.1 if you prefer unfancyness. *Eats own hat* And all this time I thought I couldn't do that.
|
Tue Sep 08, 2009 6:06 pm |
|
|
piipu
Joined: Mon Jun 30, 2008 9:13 pm Posts: 499 Location: Finland
|
Re: Accelerating Sniper Rifle
Oh but you can. ... And now for the obligatory post content: Just attach this script to a bullet and you have an accelerating bullet. Code: function Create(self) self.Vel = self.Vel / self.Vel.Magnitude * 10 end
function Update(self) if self.Vel.Magnitude < 300 then self.Vel = self.Vel / self.Vel.Magnitude * (self.Vel.Magnitude + 5) end end
|
Tue Sep 08, 2009 6:13 pm |
|
|
Barnox
Joined: Mon Jun 22, 2009 3:57 pm Posts: 1020
|
Re: Accelerating Sniper Rifle
Could someone upload the Dummy Sniper Rifle with this in it? I'm none too sure where the bullet part of the script is.
|
Wed Sep 16, 2009 1:45 pm |
|
|
ZevN47
Joined: Fri Mar 13, 2009 2:31 am Posts: 217 Location: Earth... I think
|
Re: Accelerating Sniper Rifle
411570N3 wrote: Make sure it caps at a certain velocity. I forgot the velocity at which stuff started disappearing, but make the cap that. I figure that would just control its range but hell what do I know? I guess I'll be nice and give you the script/Mod you need just because I'm a nice guy and want to help people The .ini version... I mean wow people have you ever heard of easiness on a simple stick? why use Lua if you don't have to? Lua lags but is fun to play with -(its like:) Paint .ini is still the base of all moding -(its like:) Bricks and Mordar I made a lua version AND a .ini version (for your modding pleasure) The Lua version uses Lua The Ini version uses emitters
Attachments:
File comment: Sorry I had to use a Zip file... shouldn't be to much of a problem
DummyAcc.zip [5.09 KiB]
Downloaded 200 times
|
Thu Sep 17, 2009 4:06 pm |
|
|
Barnox
Joined: Mon Jun 22, 2009 3:57 pm Posts: 1020
|
Re: Accelerating Sniper Rifle
You are beautiful. I'll test it in the morning. It's getting late, got college tommorrow, homework needs doing, blah blah... I kinda asked for it as a seperate/dummy replacement as I may have turned my dummy rifle into a self-killing death shot... and not backed it up.
|
Thu Sep 17, 2009 9:29 pm |
|
|
|