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: Where does the object orientation come in?

Previous Thread :: Next Thread 
haskjdfsask is not online. haskjdfsask
Joined: 08 Jun 2014
Total Posts: 810
04 Mar 2017 11:19 AM
How do I make a new custom object type?

object car (string name, int speed)

so for example I could do this:
car:Drive()
Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
04 Mar 2017 11:21 AM
### use tables to declare objects. local car = {} function car:Drive() end
Report Abuse
haskjdfsask is not online. haskjdfsask
Joined: 08 Jun 2014
Total Posts: 810
04 Mar 2017 11:25 AM
How would I define a "international" function

CalledOn:DoThis()

?
Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
04 Mar 2017 11:26 AM
http://wiki.roblox.com/index.php?title=Object-Oriented_Programming


Report Abuse
haskjdfsask is not online. haskjdfsask
Joined: 08 Jun 2014
Total Posts: 810
04 Mar 2017 11:27 AM
Oh, just like modulescripts? Alright.

So how does roblox make the functions have :?

So everything is an instance, and :GetChildren() is a part of "instance"?
Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
04 Mar 2017 11:29 AM
The colon is syntactic sugar. But yes, that is true.


Report Abuse
cars37 is not online. cars37
Joined: 27 Nov 2013
Total Posts: 189
04 Mar 2017 11:38 AM
If you really want to create an object, you need to do "object = newproxy(true)". Roblox calls this an object.
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