blockoo
|
  |
| Joined: 08 Nov 2007 |
| Total Posts: 17202 |
|
|
| 18 Sep 2011 11:09 AM |
I'm trying to make an impact kill system that kills someone if they fall from a great height. What's the best way to do this?
------------------------------------------------------------------------------------------------------------ROBLOX >>>>>>>> MC |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2011 11:17 AM |
| velocity. make it so if the velocity is greater than so much then stops fast then it kills. I have a script that hurts someone when they fall but I won't share the script. |
|
|
| Report Abuse |
|
|
blockoo
|
  |
| Joined: 08 Nov 2007 |
| Total Posts: 17202 |
|
|
| 18 Sep 2011 11:19 AM |
I was thinking that too...
while true do local vel1 = Person.Torso.Velocity.Y wait() local vel2 = Person.Torso.Velocity.Y if (vel2 - vel1 >= 100) then Person.Humanoid.Health = 0 end end
------------------------------------------------------------------------------------------------------------ROBLOX >>>>>>>> MC |
|
|
| Report Abuse |
|
|
blockoo
|
  |
| Joined: 08 Nov 2007 |
| Total Posts: 17202 |
|
|
| 18 Sep 2011 11:20 AM |
Oops, I mixed up vel1 and vel2 in the if statement
------------------------------------------------------------------------------------------------------------ROBLOX >>>>>>>> MC |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2011 11:23 AM |
| Use an event in the Humanoid. |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 18 Sep 2011 11:37 AM |
Wut event o.e?
<'+1 Post. Ujelly?'> |
|
|
| Report Abuse |
|
|
yoyoman2
|
  |
| Joined: 07 Mar 2009 |
| Total Posts: 2170 |
|
|
| 18 Sep 2011 11:58 AM |
| FallinDown event, and then velocity, it works great |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2011 11:59 AM |
Free falling,
then use math :o/ add velocity for effect. |
|
|
| Report Abuse |
|
|
yoyoman2
|
  |
| Joined: 07 Mar 2009 |
| Total Posts: 2170 |
|
|
| 18 Sep 2011 12:01 PM |
| Darkmist, free falling will make it do damage if a person is also flying or just jumping, so fallingdown would be beter |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2011 12:04 PM |
What's the difference?
I never noticed this event :l
I just put a wait() to use FreeFalling. |
|
|
| Report Abuse |
|
|
blockoo
|
  |
| Joined: 08 Nov 2007 |
| Total Posts: 17202 |
|
|
| 18 Sep 2011 02:23 PM |
| Regardless, you still have to measure a rapid deceleration somewhere |
|
|
| Report Abuse |
|
|
Zulsoras
|
  |
| Joined: 10 Sep 2008 |
| Total Posts: 963 |
|
|
| 18 Sep 2011 02:38 PM |
| add a script that copys in a local script into the player so it can measure the torso closely |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
| |
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 18 Sep 2011 03:32 PM |
When you're falling, jump stays true, so why nawt do...
while wait() and Humanoid.Jump do Fall.Value=Fall.Value+1 end then add a .Changed event, and when Jump is no longer true, it inflicts damage based on Fall's value.
<'+1 Post. Ujelly?'> |
|
|
| Report Abuse |
|
|
blockoo
|
  |
| Joined: 08 Nov 2007 |
| Total Posts: 17202 |
|
|
| 18 Sep 2011 03:42 PM |
@nate Loops will make it lag more :P |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 18 Sep 2011 03:43 PM |
ugm i was wrong jump isnt true while faling
<'+1 Post. Ujelly?'> |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 18 Sep 2011 03:43 PM |
@blockoo, .changed event.
<'+1 Post. Ujelly?'> |
|
|
| Report Abuse |
|
|
LocalChum
|
  |
| Joined: 04 Mar 2011 |
| Total Posts: 6906 |
|
| |
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 18 Sep 2011 03:49 PM |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<'+1 Post. Ujelly?'> |
|
|
| Report Abuse |
|
|
blockoo
|
  |
| Joined: 08 Nov 2007 |
| Total Posts: 17202 |
|
|
| 18 Sep 2011 03:57 PM |
@Local You be in mah territory now. loser |
|
|
| Report Abuse |
|
|
blockoo
|
  |
| Joined: 08 Nov 2007 |
| Total Posts: 17202 |
|
| |
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 18 Sep 2011 04:01 PM |
FreeFalling wouldn't do much, either, as there is no StopFalling event (:o). I'll test a few things
<'+1 Post. Ujelly?'> |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 18 Sep 2011 04:14 PM |
I almost got it, give me 10 more minutes.
<'+1 Post. Ujelly?'> |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 18 Sep 2011 04:17 PM |
Got it :3
<'+1 Post. Ujelly?'> |
|
|
| Report Abuse |
|
|
blockoo
|
  |
| Joined: 08 Nov 2007 |
| Total Posts: 17202 |
|
|
| 18 Sep 2011 04:18 PM |
You can create your own. Here's what I came up with:
function freefall() while Person.Humanoid.Jump == true do vel1 = Person.Torso.Velocity.Y wait() vel2 = Person.Torso.Velocity.Y if (vel1 - vel2 >= 100) then Person.Humanoid.Health = 0 end end end
Person.Humanoid.FreeFalling:connect(freefall) |
|
|
| Report Abuse |
|
|