View unanswered posts | View active topics It is currently Fri Dec 27, 2024 1:00 pm



Reply to topic  [ 21 posts ]  Go to page 1, 2  Next
 Accelerating Sniper Rifle 
Author Message
User avatar

Joined: Mon Jun 22, 2009 3:57 pm
Posts: 1020
Reply with quote
Post 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
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: 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
Profile WWW
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Accelerating Sniper Rifle
function Update(self)
self.Vel.Magnitude = self.Vel.Magnitude + 1;
end


Mon Sep 07, 2009 4:40 pm
Profile
User avatar

Joined: Mon Jun 30, 2008 9:13 pm
Posts: 499
Location: Finland
Reply with quote
Post Re: Accelerating Sniper Rifle
self.Vel.Magnitude is read only.


Mon Sep 07, 2009 4:44 pm
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post 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
Profile
User avatar

Joined: Mon Jun 30, 2008 9:13 pm
Posts: 499
Location: Finland
Reply with quote
Post 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
Profile
User avatar

Joined: Mon Mar 16, 2009 10:50 pm
Posts: 2175
Location: Neverwhere
Reply with quote
Post Re: Accelerating Sniper Rifle
Couldn't you simply use negative air friction?


Tue Sep 08, 2009 5:19 am
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: Accelerating Sniper Rifle
Doesn't work. They tried in the dummy drunken rocket launcher thread.


Tue Sep 08, 2009 7:50 am
Profile WWW

Joined: Sat Jan 13, 2007 11:04 pm
Posts: 2932
Reply with quote
Post 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
Profile
User avatar

Joined: Mon Jun 30, 2008 9:13 pm
Posts: 499
Location: Finland
Reply with quote
Post 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
Profile

Joined: Sat Jan 13, 2007 11:04 pm
Posts: 2932
Reply with quote
Post 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
Profile
User avatar

Joined: Mon Jun 30, 2008 9:13 pm
Posts: 499
Location: Finland
Reply with quote
Post 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
Profile
User avatar

Joined: Mon Jun 22, 2009 3:57 pm
Posts: 1020
Reply with quote
Post 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
Profile
User avatar

Joined: Fri Mar 13, 2009 2:31 am
Posts: 217
Location: Earth... I think
Reply with quote
Post 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 :lol:


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 199 times
Thu Sep 17, 2009 4:06 pm
Profile
User avatar

Joined: Mon Jun 22, 2009 3:57 pm
Posts: 1020
Reply with quote
Post Re: Accelerating Sniper Rifle
ZevN47 wrote:
stuff

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
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 21 posts ]  Go to page 1, 2  Next

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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.043s | 14 Queries | GZIP : Off ]