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: Explosives

Previous Thread :: Next Thread 
MrShoopDaWoop123 is not online. MrShoopDaWoop123
Joined: 04 Feb 2012
Total Posts: 43
07 Mar 2013 03:04 PM
Is it the RADUIS That makes it kill the player?

Or is it the PRESSURE?
Report Abuse
POC0bob is not online. POC0bob
Joined: 20 Feb 2010
Total Posts: 549
07 Mar 2013 03:05 PM
Which do you think? Ask yourself. What is radius? The size maybe? Now Pressure?
Report Abuse
eJorge is not online. eJorge
Joined: 09 Jun 2011
Total Posts: 5966
07 Mar 2013 03:09 PM
Common sense will tell you the answer.
Report Abuse
evolvedpikachu is not online. evolvedpikachu
Joined: 18 Aug 2010
Total Posts: 10696
07 Mar 2013 03:51 PM
http://wiki.roblox.com/index.php/Explosion

Get it from dere, I just found out myself.
Report Abuse
BJJScrambler is not online. BJJScrambler
Joined: 13 Jan 2013
Total Posts: 898
07 Mar 2013 04:44 PM
BlastRadius is the distance from the center of the explosion to the edge of any given part of the explosion. BlastPressure is the magnitude of the force given off to any part after the explosion. With the exception of a BlastPressure of 0, any blastpressure will break the joints of all parts it touches.

So a quick example of a pseudoexplosion would be:


local Iexplosion={}

Iexplosion.new=function(pressure,radius,position)
local obj={}
obj.pressure=pressure or 1e6
obj.radius=radius or 15
obj.position=position or Vector3.new()
if obj.pressure>0 then
for _,v in pairs(workspace:FindPartsInRegion3(
Region3.new(
position-Vector3.new(obj.radius,obj,radius,obj.radius),
position+Vector3.new(obj.radius,obj,radius,obj.radius)
),100)) do
if (v.Position-obj.position).magnitude<=obj.radius then
v:BreakJoints()
v.Velocity=v.Velocity+(v.Position-obj.position).unit*obj.pressure*v:GetMass()
end end end
return obj
end

Iexplosion.new(2.5e8,20,Vector3.new(10,10,10))
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