|
| 27 Jan 2013 12:03 AM |
I'm making a library to make ROBLOX programming shorter and easier.
So far it's very simple, and in early development, but please, give me suggestions.
http://www.roblox.com/RLua-Library-1-0-1-Alpha-item?id=104922237
The Current Version (at the time of this post) is 1.2.0.
I seem to be having trouble with changing the name of the model.
Anyways, send me your suggestions below. |
|
|
| Report Abuse |
|
|
DrHaximus
|
  |
| Joined: 22 Nov 2011 |
| Total Posts: 8410 |
|
|
| 27 Jan 2013 12:10 AM |
| Actually give us some documentation. We're not going to go through the hassle of taking and testing it if it's of no use for us. |
|
|
| Report Abuse |
|
|
|
| 27 Jan 2013 12:12 AM |
Here:
Instructions: To use, just place this anywhere in your game. You can then use the following in different scripts to shorten and simplify your code.
The following are shortened variables: _G.WS references game.Workspace _G.LGT references the Lighting Service _G.SS references the SoundService _G.TE references the Team Service _G.PLR references the Players Service _G.Terra references game.Workspace.Terrain _G.BS References BadgeService Functions: _G.Create(Class,Location,Name) creates an object. All Arguments are required.
_G.Msg(text,timeout) creates a message. timeout is the amount of time the message shows. Only text is required, and if timeout is blank, the message displays for 5 seconds.
_G.Hint(text,timeout) has the same properties as _G.Msg, but it desplays a hint instead.
Create Notification: _G.SendNotification(player,title,message,image,timeout,callback) *player - Person to notify. *title - Notification title *message - text below the title. *image - Adorning Image timeout - How long the notification shows. * - Required |
|
|
| Report Abuse |
|
|
|
| 27 Jan 2013 12:13 AM |
| Also, this is why it's in early alpha. I need more ideas from people who actually script a lot more than me. |
|
|
| Report Abuse |
|
|
Charl3s7
|
  |
| Joined: 07 Dec 2007 |
| Total Posts: 4146 |
|
|
| 27 Jan 2013 12:14 AM |
| I honestly see no use for this. |
|
|
| Report Abuse |
|
|
|
| 27 Jan 2013 12:17 AM |
| It's made to make your programming shorter and easier. I still need ideas. |
|
|
| Report Abuse |
|
|
DrHaximus
|
  |
| Joined: 22 Nov 2011 |
| Total Posts: 8410 |
|
|
| 27 Jan 2013 12:17 AM |
| It's pretty useless, since '_G.WS' is harder than simply typing 'Workspace' |
|
|
| Report Abuse |
|
|
|
| 27 Jan 2013 12:19 AM |
@DrHaximus "For some people it might be, maybe an idiot." -KRio99, friend I'm in a call with ATM. |
|
|
| Report Abuse |
|
|
|
| 27 Jan 2013 12:19 AM |
Player:DPBan(int days)
I can't think of anything else atm, but I'm sure there's plenty of room for improvement. |
|
|
| Report Abuse |
|
|
|
| 27 Jan 2013 12:20 AM |
Also, insulting your audience will surely get you more suggestions!
Good job OP. |
|
|
| Report Abuse |
|
|
|
| 27 Jan 2013 12:21 AM |
| It's more of an in-script thing. |
|
|
| Report Abuse |
|
|
| |
|
|
| 27 Jan 2013 12:26 AM |
| @awsum hmm. I might consider that. |
|
|
| Report Abuse |
|
|
DrHaximus
|
  |
| Joined: 22 Nov 2011 |
| Total Posts: 8410 |
|
|
| 27 Jan 2013 12:27 AM |
Wait, you're calling me an idiot?
That's pretty ironic. |
|
|
| Report Abuse |
|
|
|
| 27 Jan 2013 12:30 AM |
| @DrHaximus I didn't call you an idiot. I just gave you an opinion from an idiot. |
|
|
| Report Abuse |
|
|
|
| 27 Jan 2013 12:54 AM |
No, really, make it lowercase.
If you want to simplify typing, try not to make it high-speed obstacle course.
Right now, you've got some sort of rhythm game going on with when the Shift key needs to be pressed.
$ = Shift | = No Shift
_G.WS $$|$$
Holding down Shift can slow typing, and using the Caps Lock can be inefficient. Having the user lift the Shift key halfway through can make it worse.
Remove the underscore, make it all lowercase. Problems solved.
g.ws |||| |
|
|
| Report Abuse |
|
|
|
| 27 Jan 2013 01:02 AM |
| @awsum This only works with the _G thing, which is a public table that can be accessed by any script. That's not something I can change. |
|
|
| Report Abuse |
|
|
|
| 27 Jan 2013 01:04 AM |
Yeah, it takes 0.01 seconds of your life to press Shift.
-- I am on a seafood diet. I see food, and I eat it. |
|
|
| Report Abuse |
|
|
|
| 27 Jan 2013 01:05 AM |
@rock:
g=_g g.ws=workspace g.ws.Name = "hi"
-- I am on a seafood diet. I see food, and I eat it. |
|
|
| Report Abuse |
|
|
|
| 27 Jan 2013 01:06 AM |
Whoops;
g=_G g.ws=workspace g.ws.Name="hi"
-- I am on a seafood diet. I see food, and I eat it. |
|
|
| Report Abuse |
|
|
DrHaximus
|
  |
| Joined: 22 Nov 2011 |
| Total Posts: 8410 |
|
|
| 27 Jan 2013 01:09 AM |
@IamAwesome
Sure, but how would you use that in a global situation?
_G.['g']=_G
but then you'd have to use _G.g, otherwise using g=_G.
_Gception |
|
|
| Report Abuse |
|
|
|
| 27 Jan 2013 01:21 AM |
Oh yeah. Anyway, I would do something like this:
-- Library local function blah(t) print(t) end local lib={blah=blah;} _G.load=function() for i,v in next,lib do loadstring(i.." = ...")(v) end end -- Script 2 _G.load() blah("Hi") --> hi
So you only use 1 _G function. You just have to make all your functions/variables local and then add them to a table as shown. Then, create a _G function that loads the functions inside the table into the script that the _G.load function was called on.
-- I am on a seafood diet. I see food, and I eat it. |
|
|
| Report Abuse |
|
|
|
| 27 Jan 2013 01:24 AM |
"Yeah, it takes 0.01 seconds of your life to press Shift."
That means that, according to WolframAlpha, an average human could press the shift key 210 000 000 000 times in his entire life.
This result is pretty simple to get: just search "human average lifespan in centiseconds" on Wolfram Alpha. |
|
|
| Report Abuse |
|
|
DrHaximus
|
  |
| Joined: 22 Nov 2011 |
| Total Posts: 8410 |
|
|
| 27 Jan 2013 01:30 AM |
>his entire life
wow, excluding a gender, thats pretty low dude |
|
|
| Report Abuse |
|
|
|
| 27 Jan 2013 02:07 AM |
That's lower than low.
-- I am on a seafood diet. I see food, and I eat it. |
|
|
| Report Abuse |
|
|