vinboi
|
  |
| Joined: 29 Jul 2012 |
| Total Posts: 1278 |
|
|
| 19 Aug 2016 01:11 PM |
i dont understand them and im not sure if i need to for roblox
|
|
|
| Report Abuse |
|
|
Objectly
|
  |
| Joined: 18 Jul 2016 |
| Total Posts: 210 |
|
|
| 19 Aug 2016 01:12 PM |
| I use them for JSON strings if I'm sending data externally. |
|
|
| Report Abuse |
|
|
|
| 19 Aug 2016 01:13 PM |
I have never heard of them, but I'm not particularly good at maths. Until you get really advanced, definitely not. IDK when you get OP tho
WolfgangVonPrinz // Private Drive - Residents Only |
|
|
| Report Abuse |
|
|
alij12
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 1204 |
|
|
| 19 Aug 2016 01:13 PM |
YES! Why wouldnt they be?
ex:
I want to have a master script that holds stats for some RPG game for the NPC's
_G.Stats = { Goblin = { Health = 50 Speed = 16 Damage = 1 }, Boss = { Health = 50000, speed = 160, Damage = 10 } } |
|
|
| Report Abuse |
|
|
|
| 19 Aug 2016 01:13 PM |
That's just a table of tables?
WolfgangVonPrinz // Private Drive - Residents Only |
|
|
| Report Abuse |
|
|
|
| 19 Aug 2016 01:14 PM |
-Googles multi-dimensional table
inb4hate
WolfgangVonPrinz // Private Drive - Residents Only |
|
|
| Report Abuse |
|
|
alij12
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 1204 |
|
|
| 19 Aug 2016 01:15 PM |
| lol u skroob go back to making phantom force replicas |
|
|
| Report Abuse |
|
|
|
| 19 Aug 2016 01:19 PM |
I'd be impressed by a PF replica tbh
WolfgangVonPrinz // Private Drive - Residents Only |
|
|
| Report Abuse |
|
|
mudkip99
|
  |
| Joined: 17 Jun 2008 |
| Total Posts: 3362 |
|
|
| 19 Aug 2016 01:20 PM |
I use them to store a grid for a map since I can index them like this:
Grid[X][Y]
That way I can get tiles easily |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 19 Aug 2016 01:22 PM |
"I want to have a master script that holds stats for some RPG game for the NPC's
_G.Stats = { Goblin = { Health = 50 Speed = 16 Damage = 1 }, Boss = { Health = 50000, speed = 160, Damage = 10 } } "
I'm pretty sure the OP meant array, not dictionary. |
|
|
| Report Abuse |
|
|
alij12
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 1204 |
|
|
| 19 Aug 2016 01:23 PM |
| rip, I forget theres a difference. well you get the point |
|
|
| Report Abuse |
|
|
Kodran
|
  |
| Joined: 15 Aug 2013 |
| Total Posts: 5330 |
|
|
| 19 Aug 2016 01:24 PM |
tfw nobody knows what multidimensional arrays area >.<
They're useful if you want to store data in a grid i.e. something like a 10x10 grid and you wanna store some value or something like
local grid = {} for x = 1,10 do local col = {} for y = 1,10 do local cell = {math.random(1,100), "asdf"} col[y]=cell end grid[x]=col end
So each grid space has a random number and the string asdf, then if you want to access it via coords you can do
print(grid[5][5][1]) --access first value at x=5, y=5 >62 print(grid[5][5][2]) --access second value at x=5, y=5 >asdf
|
|
|
| Report Abuse |
|
|
Kodran
|
  |
| Joined: 15 Aug 2013 |
| Total Posts: 5330 |
|
|
| 19 Aug 2016 01:25 PM |
what multidimensional arrays are**
|
|
|
| Report Abuse |
|
|
alij12
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 1204 |
|
| |
|
Kodran
|
  |
| Joined: 15 Aug 2013 |
| Total Posts: 5330 |
|
|
| 19 Aug 2016 01:28 PM |
Ah my mistake I didn't see that post.
|
|
|
| Report Abuse |
|
|
|
| 19 Aug 2016 01:56 PM |
"i dont understand them and im not sure if i need to for roblox"
Don't fall into the thinking trap of "what's this and how to use it" in programming. You do not need to understand everything when you are a beginner. Just start small and then you can build on your knowledge as you go.
Besides, there's no single use that's representative of all cases. Your question is like asking "i don't understand a hammer and i'm not sure if i need it in my house". You may find a clever way to use it, or you may never need it. It all just depends. |
|
|
| Report Abuse |
|
|