|
| 07 Dec 2013 02:05 PM |
http://wiki.roblox.com/index.php/RBX.lua.ModuleScript_(Object)
it appears to be a library thingy |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2013 02:08 PM |
| Wow, this is awesome. Having scripts as objects and calling require to get the table. Damn, I want this so bad. Thank you for bringing this out. |
|
|
| Report Abuse |
|
|
lordrambo
|
  |
| Joined: 16 Jun 2009 |
| Total Posts: 20628 |
|
|
| 07 Dec 2013 02:35 PM |
| This is awesome. I wonder if they're really working on it. It says the page was last modified today. |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2013 02:37 PM |
| Yeah, it is an actual feature. I think sim0nsays told us in IRC |
|
|
| Report Abuse |
|
|
| |
|
|
| 07 Dec 2013 06:31 PM |
http://wiki.roblox.com/index.php/Function_dump/Functions_specific_to_ROBLOX#require
recent changes ppl |
|
|
| Report Abuse |
|
|
BetterBe
|
  |
| Joined: 25 Jan 2009 |
| Total Posts: 1034 |
|
|
| 07 Dec 2013 07:21 PM |
im guessing this will be the next step for Bindable and Remote Functions.
EventScripts will probably come after this. |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2013 07:33 PM |
I've known for a while, actually. RbxDev has a thread about it.
~LuaWeaver; Programmer, gamer, developer. |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2013 07:35 PM |
| Sorry for sounding like a total newbie, but how would this be a benefit to us? What is its practical use? |
|
|
| Report Abuse |
|
|
BetterBe
|
  |
| Joined: 25 Jan 2009 |
| Total Posts: 1034 |
|
|
| 07 Dec 2013 07:38 PM |
well the practical use is instead of making functions for an Invoke, we can make the Invoke self aware so if i say:
requite(script) then the script will run, without having to create perimeters or disabling it to make a switch. we could easily just run it one to do a specific task and still be able to act like a RemoteFunction. Meaning we can do require(Script) with both a normal and Local Script. |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2013 07:41 PM |
| I still don't understand how I'd use it :P Maybe I'll run into a use for it in the future. |
|
|
| Report Abuse |
|
|
|
| 07 Dec 2013 10:37 PM |
| It is for the new require() function which will be like PHP's. It will allow you to get the source of one script and inject it into another. It's the same as typing the code out into one script, but you can separate them into separate scripts instead. Basically like mini-libraries or APIs (or using _G). |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2013 01:29 AM |
wow.
This forum is way, way slower than the dev forums. Anyways, here's some poast from the OP on the dev forums (Lordrugdumph):
The version of studio on GT2 currently has support for a new Instance type "ModuleScript". Module scripts are meant to be a way to componentize your code in an easier and more flexible way than BindableFunctions. Here's a rundown:
-ModuleScripts do not execute on their own (unlike other kinds of scripts) -ModuleScript's source can be executed by using the new global function require() require() takes one argument, a reference to a ModuleScript Instance -ModuleScripts are sort of like big functions -Each module script should have a return statement; this lua value is returned from the call to require() -You can return any lua value from a module (functions, tables, Instances, etc) -ModuleScripts can be require()ed regardless of where the module script is in the instance tree -A ModuleScript can be require()ed even if it has never been in the DataModel -ModuleScripts will be run at most once per Instance -- if two scripts require() the same ModuleScript Instance, that script will be run once, and the same exact return value will be returned to both require()ers -The exception to this is client/server: the script will be run at most once in the server, and additionally at most once in each client that require()s from a LocalScript -ModuleScripts are allowed to yield (if they call a yielding function, like wait()). When they do, any script currently require()ing it will also yield. We guarantee that if the ModuleScript does not yield then require() will not yield |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2013 01:33 AM |
| Love to Roblox if this is added. |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2013 03:50 AM |
>which will be like PHP's
........or Lua's........................... |
|
|
| Report Abuse |
|
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 08 Dec 2013 06:18 AM |
cOLD mOLD on a sLATE pLATE
Oh, wait, I just realised not even half of you are in RBXDev. |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2013 06:59 AM |
| Decrease that fraction by a little more, don't even know what the heck it is^^ |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2013 08:01 AM |
| It's very hard, you need to have lots of place visits, make a place with cool stuff, screenshot it, talk why you should be accepted, etc |
|
|
| Report Abuse |
|
|
sncplay42
|
  |
| Joined: 27 Nov 2008 |
| Total Posts: 11891 |
|
|
| 08 Dec 2013 08:03 AM |
>It's very hard, you need to have lots of place visits, make a place with cool stuff, screenshot it, talk why you should be accepted, etc
Meh I only did at most the first two of those |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2013 08:04 AM |
| ModuleScripts are already out, lol. Just hidden currently. |
|
|
| Report Abuse |
|
|
sncplay42
|
  |
| Joined: 27 Nov 2008 |
| Total Posts: 11891 |
|
|
| 08 Dec 2013 08:06 AM |
Yeah nobody bothered to mention their release
I'm not sure how well they're working |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2013 08:07 AM |
@snc Excellently, actually. No issues found with ModuleScripts so far.
SurfaceGuis only have z-fighting atm, which apparently maxvee's going to fix. |
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|