4,400
edits
(Adding parenthesis to functions for consistency) |
m (Link to special directory articles) |
||
Line 9: | Line 9: | ||
cmdarg() will keep working in (joystick) XML-'''bindings''' and on the top-level of embedded Nasal scripts (i.e. dialog and animation XML files). | cmdarg() will keep working in (joystick) XML-'''bindings''' and on the top-level of embedded Nasal scripts (i.e. dialog and animation XML files). | ||
As such, the cmdarg() function is primarily used for listener callbacks declared in XML markup, cmdarg() returns the listened-to property as props.Node object, so you can use it with all its methods (see $FG_ROOT/Nasal/props.nas) for example: | As such, the cmdarg() function is primarily used for listener callbacks declared in XML markup, cmdarg() returns the listened-to property as props.Node object, so you can use it with all its methods (see [[$FG_ROOT]]/Nasal/props.nas) for example: | ||
print(cmdarg().getPath(), " has been changed to ", cmdarg().getValue()) | print(cmdarg().getPath(), " has been changed to ", cmdarg().getValue()) | ||
Line 39: | Line 39: | ||
=== <tt>fgcommand()</tt> === | === <tt>fgcommand()</tt> === | ||
Runs an internal "fgcommand", see $FG_ROOT/Docs/README.commands for a list of available commands: http://gitorious.org/fg/fgdata/blobs/master/Docs/README.commands | Runs an internal "fgcommand", see [[$FG_ROOT]]/Docs/README.commands for a list of available commands: http://gitorious.org/fg/fgdata/blobs/master/Docs/README.commands | ||