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 » Scripters
Home Search
 

Re: are multi-dimensional tables/array useful in roblox?

Previous Thread :: Next Thread 
vinboi is not online. 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 is not online. 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
AutoCarrot is not online. AutoCarrot
Joined: 24 Oct 2013
Total Posts: 5588
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 is not online. 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
AutoCarrot is not online. AutoCarrot
Joined: 24 Oct 2013
Total Posts: 5588
19 Aug 2016 01:13 PM
That's just a table of tables?


WolfgangVonPrinz // Private Drive - Residents Only
Report Abuse
AutoCarrot is not online. AutoCarrot
Joined: 24 Oct 2013
Total Posts: 5588
19 Aug 2016 01:14 PM
-Googles multi-dimensional table


inb4hate


WolfgangVonPrinz // Private Drive - Residents Only
Report Abuse
alij12 is not online. 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
AutoCarrot is not online. AutoCarrot
Joined: 24 Oct 2013
Total Posts: 5588
19 Aug 2016 01:19 PM
I'd be impressed by a PF replica tbh


WolfgangVonPrinz // Private Drive - Residents Only
Report Abuse
mudkip99 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. Kodran
Joined: 15 Aug 2013
Total Posts: 5330
19 Aug 2016 01:25 PM
what multidimensional arrays are**


Report Abuse
alij12 is not online. alij12
Joined: 03 Oct 2011
Total Posts: 1204
19 Aug 2016 01:26 PM
^ mud basically said that
Report Abuse
Kodran is not online. 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
TheGrayHat is not online. TheGrayHat
Joined: 02 May 2014
Total Posts: 523
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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