of     2   
chevron_rightchevron_rightchevron_right

troy1002x
#26630263Tuesday, June 01, 2010 11:25 PM GMT

Everytime you write any set of words inside your script, it will detect any function that contains those set of words and creates a scroll menu containing all of it, you can just click the word you want, type it down normally, or just use the arrow keys and press enter.
troy1002x
#26631382Tuesday, June 01, 2010 11:42 PM GMT

Bump.
Varp
#26632043Tuesday, June 01, 2010 11:53 PM GMT

Very difficult, if not impossible to do with Lua.
DarkLight08
#26632217Tuesday, June 01, 2010 11:56 PM GMT

@Varp: Actually, it wouldn't be difficult or impossible. Macromedia DreamWeaver has this same function in it, as does MSN. If you type '/' in MSN, it comes up with a list of commands, as does DreamWeaver if you are in Code View. So this wouldn't be hard at all. ~{Idiots are fun. No wonder every village wants one.}~
Varp
#26632762Wednesday, June 02, 2010 12:05 AM GMT

@DarkLight And do either of those use Lua? Tell me what type variable 'a' is after this: local a = workspace.Player.Something.Value Cannot be figured out. Lua is an untyped language. This makes code complete very difficult - and in most cases, completely impossible. It also doesn't work for stuff like: local n = (x position of a mouse) local a = nil if(n > 95){ a = 5 }elseif(n > 90){ a = CFrame.new() }elseif(n > 85){ a = {1,3,5} }elseif(n > 80){ a = Vector3.new() ... Also impossible. Worse yet is that globals cannot be considered constant. You don't know what CFrame.new will return, and you don't know what inputs to the __index function yield a value, which is the basis of any such system. There is really no application in which you can be sure -and there's very few in which you can have a guess at what might come after it.
DarkLight08
#26633026Wednesday, June 02, 2010 12:09 AM GMT

No, I think he means if you typed 'on', a scroll bar would come up saying things like: Touch Clicked Touched PlayerEnter Things like that. That is what DreamWeaver does. Typing in one piece of a function brings up all of the possible combinations. ~{Idiots are fun. No wonder every village wants one.}~
troy1002x
#26633121Wednesday, June 02, 2010 12:11 AM GMT

Varp, the admins don't use LUA in developing programs.
Varp
#26633260Wednesday, June 02, 2010 12:13 AM GMT

I understand what he's saying - it's code complete, but it's not possible for ROBLOX. Also, 'onTouch' isn't a function, and neither are 'onClicked', 'onTouched' or 'onPlayerEnter'. Those can be defined. However, so can 'onAsfjgksdjfhgjkdsfhgasfgdfsgsdfh', and it's no less valid than 'onTouched'
Varp
#26633397Wednesday, June 02, 2010 12:14 AM GMT

"Varp, the admins don't use LUA in developing programs." Yes, I know, but they probably already have code-complete (I think they use C# or C++ - both of which are typed languages), but that's not relevant to the suggestion.
troy1002x
#26633470Wednesday, June 02, 2010 12:15 AM GMT

Even Visual Basic used this technique.
Varp
#26633515Wednesday, June 02, 2010 12:16 AM GMT

Basic is typed. Lua is not. Same flaw.
DarkLight08
#26633896Wednesday, June 02, 2010 12:22 AM GMT

No, the ROBLOX admins who developed the Lua coding for ROBLOX can make the drop-down list using pre-built functions like 'onTouch' and 'onClicked'. We don't have input. Typing in 'onAhshkfjhkajhfl' wouldn't come up with anything because it doesn't exist unless WE make it. And if WE make it, then it doesn't come up in the function list because it isn't something that ROBLOX ships with. Do you get it? ~{Idiots are fun. No wonder every village wants one.}~
Varp
#26634303Wednesday, June 02, 2010 12:28 AM GMT

But onTouch doesn't exist unless we make it either. Trying running the script print(onTouch). It'll print 'nil'. Also, you can't guarantee the existence of any of the globals. I suppose you can guess, and do some minor things through that - but only the built in libraries could be done through that since the hierarchy cannot be trusted to be the same everywhere. And the standard libraries can be looked at via the wiki's function dump.
DarkLight08
#26634677Wednesday, June 02, 2010 12:33 AM GMT

Let me explain it a bit clearer. onTouch is already defined, right? The studio can recognise that it says 'when something touches something' like when a player touches a brick? It doesn't know what touches what until we tell it to. However, it already has a basic definition. onClick is already defined too. The studio can recognise that it says 'when something is clicked', like when a player clicks a brick. It doesn't know what can be clicked until we tell it. However, it already has a basic definition. onAhshshs is NOT already defined. The studio cannot recognise it because it hasn't been programmed. It could mean anything. It does not have a basic definition until the player tells it what it means. Functions like 'onClick' and 'onTouch' could be included in the drop-down menu because ROBLOX has already defined it. 'onAhshshs' could NOT be included in the drop-down menu because ROBLOX has not defined it. Anything that ROBLOX defines can go into the drop-down menu. Anything that a player defines cannot go into the drop-down menu. ~{Idiots are fun. No wonder every village wants one.}~
Varp
#26634908Wednesday, June 02, 2010 12:36 AM GMT

"onTouch is already defined, right?" No, it's not. Run this script: print(onTouch) --> nil function onTouch() end print(onTouch) --> function 0xNNNNNN The only things that this could work for would be: The table library The math library The string library The core library
DarkLight08
#26635149Wednesday, June 02, 2010 12:40 AM GMT

No, not like that. onTouch is already in the library. You do not need to define onTouch. All you need to do is give it a part and a connector. With onAhshs, you need to tell it everything. You need to explain what onAhshs means, what it does and when it should be activated. With onTouch, it knows that it will be activated 'when ### touches ###'. All we have to do is tell it what the ### are and then tell it what to do when it recognises that ### has touched ###. Do you get it now? ~{Idiots are fun. No wonder every village wants one.}~
troy1002x
#26635455Wednesday, June 02, 2010 12:44 AM GMT

Varp doesn't get it, let me explain this idea clearly. Whenever you type something in a script, it drops a drop down menu showing all the possible BASIC functions that matches any set of words with the ones that your typing.
Varp
#26635489Wednesday, June 02, 2010 12:44 AM GMT

onTouch is not defined. It's user-defined. Seriously, if something is defined print(something) Will not print nil. So, for example print(print) -> function 0xNNNNNN So open ROBLOX Studio or something, and run the script print(onTouch) and see what comes out. Once you do, tell me the output, and if it's nil, only the standard libraries/things in _G can be used - if that. You can't guarantee that those haven't been modified, and honestly, most the things in _G are short to type, and it's unlikely that you'll want to use something you don't know the name of.
troy1002x
#26635603Wednesday, June 02, 2010 12:46 AM GMT

SIGH DUDE. I'LL PM YOU AN EXAMPLE VIDEO, YOUR IDEA OF IT STRAYS TOO FAR.
DarkLight08
#26635929Wednesday, June 02, 2010 12:51 AM GMT

Stop saying print(something). Completely ignore that. I KNOW that if you type in print(onTouch) it won't work. Gah, I need a better way to explain it to you. I know what I'm talking about because I've seen it work. Ok, when ROBLOX starting developing their own Lua language they created 'onTouch'. For it to work, all we have to do is give it something to touch and something to touch it. When we have those, all we need to do is write up something in between such as: function onTouch(part) script.Parent.Transparency = 0 end script.Parent.Touched:connect(onTouch) But, if we tried to do the exact same thing with onCustom, nothing would happen: function onCustom(part) script.Parent.Transparency = 0 end script.Parent.Custom:connect(onCustom) We have to tell it what Custom means. ROBLOX doesn't have a clue what it means. But we don't have to tell it what Touch means as that has already been programmed into the engine. Touch still needs SOME information to get it to work, but Custom needs a lot more because it hasn't been programmed into the engine. Do you get it now? ~{Idiots are fun. No wonder every village wants one.}~
troy1002x
#26636076Wednesday, June 02, 2010 12:53 AM GMT

I gave him a crudely made example image too.
Varp
#26636218Wednesday, June 02, 2010 12:55 AM GMT

But they key is not onTouch. It's script.Parent.Touched rather than script.Parent.Custom function onCustom(part) script.Parent.Transparency = 0 end script.Parent.Touched:connect(onCustom) That's perfectly valid. Using 'onTouched' and stuff, is really just a habit that the wiki gives you, and is not part of the API. I've been scripting on ROBLOX for a long time, and I know the API well, and the API has never cared when I do something like script.Parent.Touched:connect(function(part) script.Parent.Transparency = 0 end) or anything else.
DarkLight08
#26636347Wednesday, June 02, 2010 12:56 AM GMT

*headdesk* What am I doing wrong? onTouch exists. onCustom doesn't until we define what we want onCustom to do. ~{Idiots are fun. No wonder every village wants one.}~
Varp
#26636439Wednesday, June 02, 2010 12:57 AM GMT

But... onTouch doesn't exist until we define what onTouch is supposed to do... (and then do a connection line)
troy1002x
#26636647Wednesday, June 02, 2010 1:00 AM GMT

Dude.... It's just BASIC WORDS. IT HELPS FINDING THE RIGHT FUNCTION TO DO THE RIGHT THING, LIKE A GUIDE >:U

    of     2   
chevron_rightchevron_rightchevron_right