|
As a scripter, I find it a bit annoying that a function I make in one script can't be called in another. I mean, say I wanted to code source code for an OS and write a window manager over it. I can't call up the source functions! If you could do like:
script.Parent.Source.Function Attach(text, script.Parent.Source.table1)
or something like that. Just an example, but we could do so much more by calling up functions from the other scripts we wrote to make better game engines and such. Just a thought. |
|
|
Bump! Still no supporters? |
|
|
I'm not a scripter so I don't have the most knowledge on scripting...
I support because I get what you're trying to say.
god dangit why did you have to do that |
|
GepGunJoin Date: 2012-11-16 Post Count: 157 |
|
|
|
...Man I'm rusty on my scripting, but if I get it correctly, you want one of your scripts to be able to tell your other scripts when to work?
I support this idea.
So very much.
In fact, I love it.
Put a beat on it and I'll buy it. -Alex Agnew, Belgian comedian |
|
|
One way I know of to make scripts trigger other scripts is to have the original script trigger a Value by changing the number of the value. Then you make the secondary scripts trigger only when that value is set to the correct number.
I am an eggspert in the eggcelent art of egg puns. |
|
dom2d2Join Date: 2008-04-11 Post Count: 6397 |
Even though I am not a scripter, I completely support this. It is a great idea and would open many opportunities. |
|
UlrondJoin Date: 2011-06-23 Post Count: 11962 |
Excellent idea.
Full Support. |
|
|
There are bindablefunctions in the object browser, use them, they exist. |
|
|
Thank you for the support! |
|
|
|
|
--create this in a localscript inside startergui:
Instance.new("BindableFunction", script)
local func = script.BindableFunction
func.OnInvoke =
function(arg)
print(arg)
end
--and this into a normal script in workspace:
local plrs = game.Players:children()
for i = 1, #plrs do
local func = plrs[i].PlayerGui.LocalScript.BindableFunction
if func then
func:Invoke("YAY IT WORKS")
end
end
as you see, you can access localscripts from global, and the other way around, only with bindablefunctions |
|
|
that script wouldnt work as there are a few errors, that was just an example of how they operate |
|