generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Impact kill...

Previous Thread :: Next Thread 
blockoo is not online. 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
greatestdan is not online. greatestdan
Joined: 08 Sep 2008
Total Posts: 504
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 is not online. 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 is not online. 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
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
18 Sep 2011 11:23 AM
Use an event in the Humanoid.
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
18 Sep 2011 11:37 AM
Wut event o.e?

­<'+1 Post. Ujelly?'>
Report Abuse
yoyoman2 is not online. yoyoman2
Joined: 07 Mar 2009
Total Posts: 2170
18 Sep 2011 11:58 AM
FallinDown event, and then velocity, it works great
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
18 Sep 2011 11:59 AM
Free falling,

then use math :o/ add velocity for effect.
Report Abuse
yoyoman2 is not online. 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
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
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 is not online. 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 is not online. 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 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
18 Sep 2011 03:30 PM
^wut

­<'+1 Post. Ujelly?'>
Report Abuse
nate890 is not online. 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 is not online. 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 is not online. 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 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
18 Sep 2011 03:43 PM
@blockoo, .changed event.

­<'+1 Post. Ujelly?'>
Report Abuse
LocalChum is not online. LocalChum
Joined: 04 Mar 2011
Total Posts: 6906
18 Sep 2011 03:46 PM
ewww a non blocco
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
18 Sep 2011 03:49 PM
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

­<'+1 Post. Ujelly?'>
Report Abuse
blockoo is not online. 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 is not online. blockoo
Joined: 08 Nov 2007
Total Posts: 17202
18 Sep 2011 03:57 PM
@nate

FreeFalling event?
Report Abuse
nate890 is not online. 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 is not online. 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 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
18 Sep 2011 04:17 PM
Got it :3

­<'+1 Post. Ujelly?'>
Report Abuse
blockoo is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image