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
 

There should be like a "GlobalVariableScript" in "Game"

Previous Thread :: Next Thread 
EMAN381 is not online. 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
Brandonhare is not online. Brandonhare
Joined: 02 May 2007
Total Posts: 11005
10 Feb 2012 05:40 AM
You can already do that.
http://wiki.roblox.com/index.php/Global_Functions
Report Abuse
aboy5643 is not online. 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
trappingnoobs is not online. trappingnoobs
Joined: 05 Oct 2008
Total Posts: 19100
10 Feb 2012 10:07 AM
@aboy

disable them and make the script that declares globals enable them
Report Abuse
EMAN381 is not online. 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 is online. 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 is not online. 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 is not online. 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 is not online. 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
trappingnoobs is not online. trappingnoobs
Joined: 05 Oct 2008
Total Posts: 19100
10 Feb 2012 04:36 PM
wow you didn't know how to put functions in a table?
Report Abuse
aboy5643 is not online. aboy5643
Joined: 08 Oct 2010
Total Posts: 5458
10 Feb 2012 04:45 PM
^ wat he said

"Locked" - Sorcus
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