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: Storing Array(Tables) to a specific object.

Previous Thread :: Next Thread 
KOzero is not online. KOzero
Joined: 11 May 2010
Total Posts: 1411
08 Oct 2015 06:05 AM
A bit like java when you create a class that has the methods, constructors and the variables(properties) except all I need is to make an object to have a property which is of type array.
Report Abuse
KOzero is not online. KOzero
Joined: 11 May 2010
Total Posts: 1411
08 Oct 2015 02:03 PM
Bump.
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
08 Oct 2015 02:11 PM
Are you saying you want the object's datatype to be an array?
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
08 Oct 2015 02:12 PM
What? This isn't Java stop thinking it's Java [6]
Report Abuse
KOzero is not online. KOzero
Joined: 11 May 2010
Total Posts: 1411
08 Oct 2015 02:16 PM
@Goulstem No I want to add a property to an object (Config file in this case) that stores an array/table value.
Report Abuse
KOzero is not online. KOzero
Joined: 11 May 2010
Total Posts: 1411
08 Oct 2015 02:18 PM
Sorry for double bumping I sent the post before reply to eLunate's post

@eLunate I don't quite understand what you're saying.
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
08 Oct 2015 02:27 PM
Wait wait we're talking about Roblox here right?
Report Abuse
KOzero is not online. KOzero
Joined: 11 May 2010
Total Posts: 1411
08 Oct 2015 02:31 PM
Just didn't understand what [6] which left me a bit confused.Anyway ,Yes this is Roblox but why can't Roblox's game engine allow the developer to be more free from the limits Roblox holds to make "Developing" time consuming and some cases frustrating.
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
08 Oct 2015 02:36 PM
What? That's perhaps one of the more rediculous things I've heard on here.
Report Abuse
KOzero is not online. KOzero
Joined: 11 May 2010
Total Posts: 1411
08 Oct 2015 03:02 PM
...
Report Abuse
xDionysius is not online. xDionysius
Joined: 28 Dec 2012
Total Posts: 45
08 Oct 2015 03:05 PM
You mean like this:

local Properties = {}

Properties.Var = 1
Properties.Another = 2

Or like this:

local Properties = {
Var = 1,
Another = 2
}
Report Abuse
KOzero is not online. KOzero
Joined: 11 May 2010
Total Posts: 1411
08 Oct 2015 03:22 PM
Not really.

A property that stores only table values.

Something like this:

local lunchbox = {"juice","crisps","sandwich"}

Object.lunch = lunchbox
--or store it directly
Object.lunch = {"juice","crisps","sandwich"}
--Where lunch is a custom property

--[[Or this
Implementing value objects, IntValues,BoolValues ,etc
Except that there should be an ArrayValue / TableValue object but sadly there isn't one.
]]
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
08 Oct 2015 03:33 PM
Modules.
Report Abuse
KOzero is not online. KOzero
Joined: 11 May 2010
Total Posts: 1411
08 Oct 2015 03:50 PM
But don't modules return the same thing the module is called the first time?
Report Abuse
KOzero is not online. KOzero
Joined: 11 May 2010
Total Posts: 1411
09 Oct 2015 02:18 AM
Bump.
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
09 Oct 2015 11:15 AM
Yeah, but they can return a table and you can add to it in a script.
Report Abuse
KOzero is not online. KOzero
Joined: 11 May 2010
Total Posts: 1411
10 Oct 2015 01:11 PM
The property value will change, that's the problem.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
10 Oct 2015 01:42 PM
Lemme get this straight. You want a table:

local obj = {}


With a property:

local obj = {property=value}


Where the the value can only be a table?
Report Abuse
KOzero is not online. KOzero
Joined: 11 May 2010
Total Posts: 1411
10 Oct 2015 02:52 PM
An object that has property that only accepts tables to be assigned to it.
Report Abuse
KOzero is not online. KOzero
Joined: 11 May 2010
Total Posts: 1411
10 Oct 2015 02:53 PM
In this case the object is a model.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
10 Oct 2015 03:27 PM
OH

I UNDERSTAND NOW


Okay, you can't make properties of arrays, HOWEVER you can instead use a Folder object, and NumberValues/StringValues/etc.
Report Abuse
KOzero is not online. KOzero
Joined: 11 May 2010
Total Posts: 1411
11 Oct 2015 01:43 AM
I didn't think of that!
A folder acting as an array while storing values into it.

Thanks so much you don't know how much this means to me!
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
11 Oct 2015 06:37 AM
Np :)
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