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: Explosion exceptions?

Previous Thread :: Next Thread 
Supah is not online. Supah
Joined: 16 Aug 2008
Total Posts: 921
21 Nov 2012 11:07 PM
Would it be possible to make a specific path for the explosion? Like, have the explosion range in an odd shape, so a person 3 feet away from the explosion on the left would die, but 3 feet away on the right wouldnt?
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
21 Nov 2012 11:14 PM
You'd have to do some fancy vector math for this, but yes it's possible.
Report Abuse
Supah is not online. Supah
Joined: 16 Aug 2008
Total Posts: 921
21 Nov 2012 11:15 PM
Ooh yay :3
I don't need "Almost Impossible"
All I need from that is "possible"
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
21 Nov 2012 11:16 PM
Oh it's nowhere near impossible.
It uses the same basic concept as my radar GUI.

I suppose I did forget to mention I know how to do this. :3
Report Abuse
Supah is not online. Supah
Joined: 16 Aug 2008
Total Posts: 921
21 Nov 2012 11:17 PM
c: woohoo vector math and other high grade stuff i shouldn't know how to do because i'm a freshman!
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
21 Nov 2012 11:22 PM
@AFF - How would you use the vector math? The only Explosion properties that deal with the effects of the explosion are BlastPressure, BlastRadius, Position, and ExplosionType. You can use Positon to set where the explosion will happen, but there's no way you can use it to avoid a certain path within its radius.

http://wiki.roblox.com/index.php/User:ElectricBlaze
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
21 Nov 2012 11:27 PM
You're forgetting one thing, Blaze. ^_^
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
21 Nov 2012 11:29 PM
and what is that plz

http://wiki.roblox.com/index.php/User:ElectricBlaze
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
21 Nov 2012 11:39 PM
local ExplosionDirection = Vector3.new(1, 0, 0).unit
-- Replace the coordinates with your own. Keep .unit.
-- The direction is form the origin to the specified point.
local Pressure = 16 -- BlastPressure (replacement)
local LethalAngle = 90 -- Degrees. Kills if within the angle

function Explode(Position, Radius)
    local e = Instance.new("Explosion")
    e.BlastRadius = Radius
    e.Position = Position
    e.Hit:connect(function(part)
        if part ~= nil and part.Parent:FindFirstChild("Humanoid") ~= nil then
            local dif = part.Position - Position
            local a1 = math.deg( math.acos( dif.unit:Dot(ExplosionDirection) ) )
            if a1 <= LethalAngle then
                part:BreakJoints()
                part.Velocity = dif.unit * Pressure
            end
        end
    end)
    e.Parent = workspace
end

Explode(Vector3.new(0,0,0), 100)



Taking this example,


                        |
                 A     o    B
                        |
                        Dir: -->


A would be safe, but B would be killed if B is within the radius of the explosion. :D
B would also be launched. :D
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
21 Nov 2012 11:42 PM
Wait, so the Hit event overrides the default kill-everyone-within-range effect?

http://wiki.roblox.com/index.php/User:ElectricBlaze
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
21 Nov 2012 11:43 PM
Shoot I forgot to set the BlastPressure to 0!
QQ :(
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
21 Nov 2012 11:59 PM
It happened again. I posted something haxy and everyone died. :(
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
22 Nov 2012 12:27 AM
Why do you people die so quickly?
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
22 Nov 2012 09:58 AM
Oh it's because I created the explosion in my script. Sorry guys!
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
22 Nov 2012 10:00 AM
noob

http://wiki.roblox.com/index.php/User:ElectricBlaze
Report Abuse
XxChopSlaperxX is not online. XxChopSlaperxX
Joined: 09 Nov 2010
Total Posts: 3112
22 Nov 2012 10:12 AM
I guess I COULD post my marshmallow command... It is CUSTOM MADE by me. : )
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
22 Nov 2012 10:46 AM
Chop that's getting old. Could you please grow up and be just a little bit mature?
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
22 Nov 2012 10:49 AM
...What exactly did he say that's immature?

http://wiki.roblox.com/index.php/User:ElectricBlaze
Report Abuse
XxChopSlaperxX is not online. XxChopSlaperxX
Joined: 09 Nov 2010
Total Posts: 3112
22 Nov 2012 12:11 PM
http://www.roblox.com/Forum/ShowPost.aspx?PostID=3033049
Report Abuse
vampirexevipex is not online. vampirexevipex
Joined: 11 Apr 2009
Total Posts: 1598
22 Nov 2012 12:18 PM
Im just gonna post here so i can save it in my forums, quite handy.
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
22 Nov 2012 03:22 PM
I still don't understand how that's immature. All he did was copy something you said, AFF.

http://wiki.roblox.com/index.php/User:ElectricBlaze
Report Abuse
nrscsy is not online. nrscsy
Joined: 09 Nov 2012
Total Posts: 465
22 Nov 2012 03:35 PM
That unit hack, I'm shivering.
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
22 Nov 2012 03:37 PM
He keeps doing it.
Report Abuse
XxChopSlaperxX is not online. XxChopSlaperxX
Joined: 09 Nov 2010
Total Posts: 3112
22 Nov 2012 03:39 PM
Did it like twice...
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