superior
|
  |
| Joined: 13 Apr 2008 |
| Total Posts: 1662 |
|
|
| 03 Sep 2011 09:49 PM |
map = {} local region = Region3.new(workspace.Base.Position-workspace.Base.Size/2, workspace.Base.Position+workspace.Base.Size/2) local parts = workspace:FindPartsInRegion3(region, workspace.Base, 50) table.insert(map, parts) for i = 1, #map do print(map[i]) end
This prints "table: 1EB20A70", or some other random numbers. :/ Am I doing this right? Sorry, I'm new to Region3 stuff. |
|
|
| Report Abuse |
|
|
|
| 03 Sep 2011 09:50 PM |
Orly? New function? Didn't hear of it. Probably because I don't even get on Roblox, I just forum. Am I talking to myself? |
|
|
| Report Abuse |
|
|
superior
|
  |
| Joined: 13 Apr 2008 |
| Total Posts: 1662 |
|
| |
|
swmaniac
|
  |
| Joined: 28 Jun 2008 |
| Total Posts: 15773 |
|
|
| 03 Sep 2011 09:51 PM |
@Dr
Yes
:FindPartsInRegion3 returns a table with up to the third argument of the function. (max 100)
You have to loop through the table. |
|
|
| Report Abuse |
|
|
Spectrumw
|
  |
| Joined: 04 Aug 2009 |
| Total Posts: 13510 |
|
|
| 03 Sep 2011 09:52 PM |
| FindPartsInRegion3 returns a table. |
|
|
| Report Abuse |
|
|
Spectrumw
|
  |
| Joined: 04 Aug 2009 |
| Total Posts: 13510 |
|
|
| 03 Sep 2011 09:53 PM |
@swm OMG Y U EARLY POSTED?! |
|
|
| Report Abuse |
|
|
superior
|
  |
| Joined: 13 Apr 2008 |
| Total Posts: 1662 |
|
|
| 03 Sep 2011 09:54 PM |
| Ah I see. So I would just replace "...#map do" with "...#parts do". Thanks. |
|
|
| Report Abuse |
|
|
|
| 03 Sep 2011 09:54 PM |
@Spectrum I miss you. You were the funniest person in the world < / 3 |
|
|
| Report Abuse |
|
|
swmaniac
|
  |
| Joined: 28 Jun 2008 |
| Total Posts: 15773 |
|
|
| 03 Sep 2011 09:54 PM |
@Spectrum
I was going 88 MPH when I posted, sorry 'bout that.
If you don't get the reference... just don't ask.
so like.
table = workspace:FindPartsInRegion3(...) for i, v in pairs(table) do -- Do stuff end |
|
|
| Report Abuse |
|
|
Spectrumw
|
  |
| Joined: 04 Aug 2009 |
| Total Posts: 13510 |
|
|
| 03 Sep 2011 09:56 PM |
"I miss you. You were the funniest person in the world < / 3"
I moved to Scripters... o-o
@swmaniac That reminds me the 50mph men... Hilarious end. |
|
|
| Report Abuse |
|
|
|
| 03 Sep 2011 09:57 PM |
""I miss you. You were the funniest person in the world < / 3"
I moved to Scripters... o-o
@swmaniac That reminds me the 50mph men... Hilarious end." UMG WHY U MOVE? |
|
|
| Report Abuse |
|
|
superior
|
  |
| Joined: 13 Apr 2008 |
| Total Posts: 1662 |
|
|
| 03 Sep 2011 09:58 PM |
| @swm, that's what I clearly just stated. |
|
|
| Report Abuse |
|
|