
01-27-2011, 01:45 AM
|
the fake one
|
 |
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
|
|
Quote:
Originally Posted by MrOmega
Basically in getDist the params are that of onMouseDown() regardless.
|
This is intentional. You have to give the parameters names. Stefan explained it somewhere but I can't find the post.
EDIT:
Quote:
Originally Posted by Stefan
The params[] array is only created when the script is called (doesn't even need to be a function, GS1 style). That is either on an event, or when you call a function of another object. To get a variable number of parameters either use func(arg1, arg2, arg3, arg4 etc) and ignore the arguments that you don't want, or pass the parameters as array.
Currently accessing the parameters for each function as array is not possible because it would mean a big speed slowdown, although if it's really important to have it then we could add something like temp.functionparams[] which dynamically converts the function parameters to variables.
|
|
|
|