Method¶
-
MethodClone:
Method newObj = Method(other);
Method contains a callable script method.
See also Signal
Static Methods¶
Methods¶
- Object Call(Array<Object> aParameters)¶
Executes a method that takes parameters. aParameters is an array containing the parameters to be passed to the method. Returns the return value of the method.
- Method Bind(int aParameterIndex, Object aValue)¶
Returns a new method with one of the method’s parameters bound to a value. The new method takes one less parameter. This can be useful when adding callbacks to waypoints. Example:
script print_data(string s) writeln(s); end_script ... script use_method() Method m = Method.Create("print_data"); Method bm = m.Bind(0, "Bound Value"); // bm takes no arguments. This will print "Bound Value": bm.Call(); end_script