|
| 08 Apr 2012 09:16 PM |
I know that someone posted this a while ago...It's just that the thread is gone.
I posted this here first instead of scripting helpers because I want the opinions of legit scripters before regular people.
So I have my idea on scripting extensions. It would go something like this:
_______________________________________________________________________________
It could be used so when you write your code you could do:
mes("TROLL",workspace)
Without having to make a pre-defined function right in the code. (If you know what I mean. Could probably do something similar with _G but do you prefer mes("LOL",workspace) or _G.mes("LOLOLOL",workspace) )
_______________________________________________________________________________
Neater code. (Awww yeaaah)
_______________________________________________________________________________
Could help newbie scripter write cooler and more efficient code. (Cooler as in more progress in code)
_______________________________________________________________________________
Profit!
_______________________________________________________________________________
I forgot.
_______________________________________________________________________________
HOW IT WOULD WORK:
1. Maybe ROBLOX would add a new section to the catalog called scripting extensions so a caveman could find it.
2. Guy buys the model.
3. When he clicks on it in ROBLOX studio it will install it automatically (InBeforePeopleUseThisToTransmitLuaViruses)
4. The scripter could now use it to script epic stuff....
_______________________________________________________________________________
If you guys have any ideas about this...Feel free to post them.
|
|
|
| Report Abuse |
|
|
miloguy
|
  |
| Joined: 19 Dec 2009 |
| Total Posts: 7702 |
|
|
| 08 Apr 2012 09:21 PM |
You can sort of do something like this already. You could make an "extensions" system that works better and cleaner than this, as this is a small example.
--testExtensions script
function beAwsome() local m=Instance.new("Message",workspace) m.Text="I am awsome" wait(1) m:Remove() end
_G.LoadTestExtensions=function(f) f.beAwsome=beAwsome end
--some other script while _G.LoadTestExtensions==nil do wait() end _G.LoadTestExtensions(getfenv(0)) --put this at the top of every script that uses these extensions
beAwsome() |
|
|
| Report Abuse |
|
|
|
| 08 Apr 2012 09:25 PM |
Yeah I like this idea but its possible to do by using functions like this one:
function waitForChild(parent, childName) while true do child = parent:findFirstChild(childName) if child then return child end parent.ChildAdded:wait() end end
But I get what your saying and it would be a nice idea. |
|
|
| Report Abuse |
|
|
|
| 08 Apr 2012 11:01 PM |
| Nice idea with the cleaner coding. Would help new scripters. |
|
|
| Report Abuse |
|
|
LocalChum
|
  |
| Joined: 04 Mar 2011 |
| Total Posts: 6906 |
|
|
| 08 Apr 2012 11:07 PM |
| No. Just no. Check out pre-existing Roblox Lua libraries such as jrLua instead of asking for an official implementation that would just slow down CoreScript load times needlessly by loading an extra library. |
|
|
| Report Abuse |
|
|
|
| 09 Apr 2012 02:09 PM |
@LocalChum
I've never heard of jrLua...So i'll go check it out. |
|
|
| Report Abuse |
|
|
Markairux
|
  |
| Joined: 07 Apr 2012 |
| Total Posts: 27 |
|
|
| 09 Apr 2012 09:30 PM |
| Sounds interesting enough. I especially like the idea of an extension that beautifies code. Perhaps multi-language beautification, too. |
|
|
| Report Abuse |
|
|
MrNicNac
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 26567 |
|
| |
|
|
| 10 Apr 2012 08:14 AM |
@MrNicNac
WAIT WHAT???? Your always legitimate! |
|
|
| Report Abuse |
|
|
|
| 10 Apr 2012 02:03 PM |
Already made. Very simple. With my system you just need to add
--#REQUIRABLE
somewhere in scripts than can have their source ran in a calling environment, then just do this:
workspace.script1:
--#REQUIRABLE function x() print("Hello") end
workspace.script2: _G.require(workspace.script1)()
x() x()
>Hello >Hello |
|
|
| Report Abuse |
|
|