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
|
  |
| Joined: 11 May 2010 |
| Total Posts: 1411 |
|
| |
|
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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 11 May 2010 |
| Total Posts: 1411 |
|
| |
|
|
| 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
|
  |
| 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
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
| |
|
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
|
  |
| Joined: 11 May 2010 |
| Total Posts: 1411 |
|
| |
|
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
|
  |
| Joined: 11 May 2010 |
| Total Posts: 1411 |
|
|
| 10 Oct 2015 01:11 PM |
| The property value will change, that's the problem. |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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
|
  |
| Joined: 11 May 2010 |
| Total Posts: 1411 |
|
|
| 10 Oct 2015 02:53 PM |
| In this case the object is a model. |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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 |
|
|
| |
|