|
| 01 Jan 2013 07:13 PM |
| I was wondering if it was possible to create an explosion so large that anything in a 150,000 stud radius would be blown apart. Is this possible to script? |
|
|
| Report Abuse |
|
|
|
| 01 Jan 2013 07:15 PM |
| Yes, however considering the fact that this is not the forum for scripting help, please take this thread to Scripting Helpers instead so this forum can keep it's wheels running without unneeded threads. |
|
|
| Report Abuse |
|
|
NVI
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 4744 |
|
|
| 02 Jan 2013 02:43 AM |
| It's not as cool as you think it is, OP. |
|
|
| Report Abuse |
|
|
eJorge
|
  |
| Joined: 09 Jun 2011 |
| Total Posts: 5966 |
|
| |
|
TeamDman
|
  |
| Joined: 04 Dec 2009 |
| Total Posts: 897 |
|
|
| 02 Jan 2013 05:25 PM |
.BlastRadius = math.huge -- woopdiddilydoo.
§TeamDman§ Anti-Jared |
|
|
| Report Abuse |
|
|
|
| 02 Jan 2013 06:07 PM |
@TeamDman,
I'm pretty sure that the BastRadius has a max of 100 studs. |
|
|
| Report Abuse |
|
|
|
| 02 Jan 2013 06:27 PM |
This is sooper easy.
Make table of all parts in workspace > Break Them > Make them fly away from a specific point on the map. ( Also dun check magnitude of 150000 Because why do you needs to not being infinite sises. )
Like dis:
local Bomb = Vector3.new(0,0,0) local Table = {} local Velocity = 400 -- lolk constants velocitys function explode() function Check(Item) if Item:IsA("Part") then if Item.Anchored ~= true then table.insert(Table, 1,Item) --adds the parts to the tables end elseif Item:IsA("Model") or Item:IsA("Hat") or Item:IsA("Tool") or Item == game.Workspace then local Child = Item:GetChildren() --olololo hacky find part in lol model lolololololol for i = 1, #Child do Check(Child[i]) end end end Check(game.Workspace) --olololololololo for a = 1, #Table do Table[a]:BreakJoints() --break dis stuff Table[a].Velocity = -(Bomb - Table[a].Position).unit * Velocity -- maked it fly way from point end end wait(2) -- Time fo splosion waitin' explode() -- make deh pew |
|
|
| Report Abuse |
|
|
|
| 02 Jan 2013 06:45 PM |
@pop More efficient:
local bpos, vel, list = Vector3.new(0, 0, 0), 400, { } function check(i) for a, b in pairs(i:GetChildren()) do check(b) end if (i:IsA("BasePart")) then if not (i.Anchored) then list[i] = i end end
function boom() for a = 1, #list do b = list[a] b:BreakJoints() b.Velocity = -(bpos - b.Position).unit * vel end
explode() |
|
|
| Report Abuse |
|
|
|
| 02 Jan 2013 06:47 PM |
Oopsies. Forgot an end, and I used popin's ::explode() method when I named mine ::boom(). Fixed:
local bpos, vel, list = Vector3.new(0, 0, 0), 400, { } function check(i) for a, b in pairs(i:GetChildren()) do check(b) end if (i:IsA("BasePart")) then if not (i.Anchored) then list[i] = i end end end
function boom() for a = 1, #list do b = list[a] b:BreakJoints() b.Velocity = -(bpos - b.Position).unit * vel end
boom() |
|
|
| Report Abuse |
|
|
|
| 02 Jan 2013 06:48 PM |
You know what I just realized? Neither of us call check() in our entire code ._.
local bpos, vel, list = Vector3.new(0, 0, 0), 400, { } function check(i) for a, b in pairs(i:GetChildren()) do check(b) end if (i:IsA("BasePart")) then if not (i.Anchored) then list[i] = i end end end
function boom() check(workspace) for a = 1, #list do b = list[a] b:BreakJoints() b.Velocity = -(bpos - b.Position).unit * vel end
boom() |
|
|
| Report Abuse |
|
|
Garnished
|
  |
| Joined: 09 Apr 2012 |
| Total Posts: 12695 |
|
| |
|