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 » Scripting Helpers
Home Search
 

Re: Enumeration/Boolean question

Previous Thread :: Next Thread 
tuxedoman23 is not online. tuxedoman23
Joined: 24 Apr 2009
Total Posts: 4670
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
DrAgonmoray is not online. DrAgonmoray
Joined: 29 Jul 2008
Total Posts: 17428
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
StealthKing95 is not online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
25 Jan 2014 06:00 PM
What do you mean?

Please elaborate a bit more
Report Abuse
tuxedoman23 is not online. tuxedoman23
Joined: 24 Apr 2009
Total Posts: 4670
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
StealthKing95 is not online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
25 Jan 2014 06:48 PM
You could create your own Enums with some metatable tweaking
Report Abuse
secretidagent is not online. secretidagent
Joined: 07 Nov 2010
Total Posts: 1600
25 Jan 2014 06:51 PM
This is what metatable is:
http://www.roblox.com/Forum/ShowPost.aspx?PostID=1971993
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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