EMAN381
|
  |
| Joined: 27 Nov 2007 |
| Total Posts: 4300 |
|
|
| 10 Feb 2012 05:30 AM |
Honestly. This could create variables for an entire game. Like you create something like "function kill(x)" and then when you type a script inside the Game.Workspace, Players, Lighting, etc., it will work within the script.
Not putting this as an official suggestion, but this would be great. No more copy and pasting. >_> |
|
|
| Report Abuse |
|
|
|
| 10 Feb 2012 05:40 AM |
You can already do that. http://wiki.roblox.com/index.php/Global_Functions |
|
|
| Report Abuse |
|
|
aboy5643
|
  |
| Joined: 08 Oct 2010 |
| Total Posts: 5458 |
|
|
| 10 Feb 2012 06:00 AM |
Well I know this would be nice for me because I always have to do a:
repeat wait() until _G.something
This would save the need for it if the variables are defined before anything executes. |
|
|
| Report Abuse |
|
|
|
| 10 Feb 2012 10:07 AM |
@aboy
disable them and make the script that declares globals enable them |
|
|
| Report Abuse |
|
|
EMAN381
|
  |
| Joined: 27 Nov 2007 |
| Total Posts: 4300 |
|
|
| 10 Feb 2012 02:54 PM |
That is just.. wow.
So is it possible if I can do _G[function click()] or something like that? |
|
|
| Report Abuse |
|
|
1waffle1
|
  |
| Joined: 16 Oct 2007 |
| Total Posts: 16381 |
|
|
| 10 Feb 2012 03:00 PM |
@Brandon If what he was asking for was created, then "Values within the _G table would be replicated into all the threads environments, not just the _G table itself." |
|
|
| Report Abuse |
|
|
EMAN381
|
  |
| Joined: 27 Nov 2007 |
| Total Posts: 4300 |
|
|
| 10 Feb 2012 03:09 PM |
| So you can't make literal functions be "_G"ed? |
|
|
| Report Abuse |
|
|
aboy5643
|
  |
| Joined: 08 Oct 2010 |
| Total Posts: 5458 |
|
|
| 10 Feb 2012 03:23 PM |
_G.funcname = function(arg1, arg2) print(arg1,arg2) end
_G.funcname("Hello, ", "world!")
|
|
|
| Report Abuse |
|
|
EMAN381
|
  |
| Joined: 27 Nov 2007 |
| Total Posts: 4300 |
|
|
| 10 Feb 2012 03:36 PM |
Oh my god, THANK YOU ABOY!
I will never forget you for this. I am now implementing my superior functions in my game now. |
|
|
| Report Abuse |
|
|
|
| 10 Feb 2012 04:36 PM |
| wow you didn't know how to put functions in a table? |
|
|
| Report Abuse |
|
|
aboy5643
|
  |
| Joined: 08 Oct 2010 |
| Total Posts: 5458 |
|
|
| 10 Feb 2012 04:45 PM |
^ wat he said
"Locked" - Sorcus |
|
|
| Report Abuse |
|
|