Author |
Message |
Barnox
Joined: Mon Jun 22, 2009 3:57 pm Posts: 1020
|
A gun that uses your velocity and mass
My request is for a gun that reads the owner's velocity and mass, and, when fired, creates a bullet with no sharpness, and the owner's mass and velocity, while reducing the owner's velocity to zero.
It'd be a gun for making emergency stops, and for re-usable jetpack rushes.
|
Sat Oct 02, 2010 12:57 pm |
|
|
Mad Alex
Joined: Sat Oct 17, 2009 2:07 pm Posts: 127
|
Re: A gun that uses your velocity and mass
It will be more simple if velocity of the actor will just simple set to 0:0 through lua.
|
Sat Oct 02, 2010 1:04 pm |
|
|
Lizardheim
DRL Developer
Joined: Fri May 15, 2009 10:29 am Posts: 4107 Location: Russia
|
Re: A gun that uses your velocity and mass
Actually, a Lua script that does that wouldn't move the actor at all. Unless you specify it to, ofc.
|
Sat Oct 02, 2010 2:29 pm |
|
|
Barnox
Joined: Mon Jun 22, 2009 3:57 pm Posts: 1020
|
Re: A gun that uses your velocity and mass
What I meant was, actor works perfectly normally up until you fire. Then: BulletMass = ActorMass BulletVelocity = ActorVelocity ActorVelocity = 0
|
Sat Oct 02, 2010 3:21 pm |
|
|
alphagamer774
Joined: Wed Feb 10, 2010 4:06 am Posts: 1294 Location: Comox, BC, Canada
|
Re: A gun that uses your velocity and mass
Wait, so when you're flying through the air, then you shoot, you stop dead, but the bullet continutes on said path?
|
Sun Oct 31, 2010 9:49 pm |
|
|
Roast Veg
Data Realms Elite
Joined: Tue May 25, 2010 8:27 pm Posts: 4521 Location: Constant motion
|
Re: A gun that uses your velocity and mass
I think that's what he means. I can't tell what would happen if you were facing backward though... would your velocity double? Or would you stop and have the bullet go right through you? Also, for that matter, what if you were standing still?
|
Sun Oct 31, 2010 9:56 pm |
|
|
alphagamer774
Joined: Wed Feb 10, 2010 4:06 am Posts: 1294 Location: Comox, BC, Canada
|
Re: A gun that uses your velocity and mass
This is now more of a physics thought-challenge rather than a plausible Idea.
|
Sun Oct 31, 2010 9:57 pm |
|
|
Roast Veg
Data Realms Elite
Joined: Tue May 25, 2010 8:27 pm Posts: 4521 Location: Constant motion
|
Re: A gun that uses your velocity and mass
That it is. I think the script should calculate which has a higher velocity, the bullet or the actor, and then nullify the velocity of the faster slower object, while allowing the other to continue on it's path.
So, if you were flying through the air faster than a speeding bullet, the gunfire would halt you [no matter where you shoot it], but the gun would also serve as a sensible firearm when unmoving.
Last edited by Roast Veg on Sun Oct 31, 2010 10:16 pm, edited 1 time in total.
|
Sun Oct 31, 2010 10:04 pm |
|
|
Petethegoat
Joined: Mon Jun 15, 2009 4:02 pm Posts: 905
|
Re: A gun that uses your velocity and mass
Roast Veg wrote: nullify the velocity of the faster object
So, if you were flying through the air faster than a speeding bullet, the gunfire would halt you [no matter where you shoot it], but the gun would also serve as a sensible firearm when unmoving. Read through that again a couple of times. Tell me if you spot the problem(s). Also, as has been said, this would be much simpler with Lua. actor.Vel = Vector(0,0); Anyway, I'm pretty damn sure this topic is dead dead dead.
|
Sun Oct 31, 2010 10:11 pm |
|
|
Roast Veg
Data Realms Elite
Joined: Tue May 25, 2010 8:27 pm Posts: 4521 Location: Constant motion
|
Re: A gun that uses your velocity and mass
Uh... I meant slower. Really I did.
I don't see this as being dead while the idea is still plausible.
|
Sun Oct 31, 2010 10:15 pm |
|
|
Petethegoat
Joined: Mon Jun 15, 2009 4:02 pm Posts: 905
|
Re: A gun that uses your velocity and mass
Code: function Create(self) for actor in MoveableMan.Actors do local avgx = actor.Pos.X - self.Pos.X; local avgy = actor.Pos.Y - self.Pos.Y; local dist = math.sqrt(avgx ^ 2 + avgy ^ 2); if dist < 30 then self.Vel = actor.Vel; self.Mass = actor.Mass; actor.Vel = Vector(0,0); end end end DEAD DEAD DEAD
|
Sun Oct 31, 2010 10:20 pm |
|
|
Roast Veg
Data Realms Elite
Joined: Tue May 25, 2010 8:27 pm Posts: 4521 Location: Constant motion
|
Re: A gun that uses your velocity and mass
Wait, wait... Attachment:
Halt.rte.7z [582 Bytes]
Downloaded 210 times
Now you can let it die.
|
Sun Oct 31, 2010 11:04 pm |
|
|
|