|
| 25 Jan 2014 05:20 PM |
| Can you use numbers to replace boolean values? For certain properties on objects, you can substitute numbers instead of using the exact Enum value you want to assign for that property. Does this work for boolean values too? |
|
|
| Report Abuse |
|
|
|
| 25 Jan 2014 05:59 PM |
I'm not entirely sure, but I don't think so. Try it and find out! But you can do this easily:
local my_number = 1 local my_boolean = my_number == 1;
In this example, "my_boolean" will be true if "my_number" is equal to 1. Otherwise it will be false. |
|
|
| Report Abuse |
|
|
|
| 25 Jan 2014 06:00 PM |
What do you mean?
Please elaborate a bit more |
|
|
| Report Abuse |
|
|
|
| 25 Jan 2014 06:13 PM |
I mean some properties that support enumeration take values like so:
Workspace.Part.Shape = "Ball" --Changes the shape Workspace.Part.Shape = 1 --Also changes the shape |
|
|
| Report Abuse |
|
|
|
| 25 Jan 2014 06:48 PM |
| You could create your own Enums with some metatable tweaking |
|
|
| Report Abuse |
|
|
|
| 25 Jan 2014 06:51 PM |
This is what metatable is: http://www.roblox.com/Forum/ShowPost.aspx?PostID=1971993 |
|
|
| Report Abuse |
|
|