Bindings: Difference between revisions

Jump to navigation Jump to search
m
Update {{func link}} form
No edit summary
m (Update {{func link}} form)
Line 70: Line 70:
: {{inote|Make sure that the script does not conflict with the {{wikipedia|List of XML and HTML character entity references#Predefined entities in XML|predefined XML entities}}. If it does, you can either put it in a {{wikipedia|CDATA|CDATA section}} or use a non-interpreted version (e.g., <code>&amp;gt;</code> in place of <code>></code>).}}
: {{inote|Make sure that the script does not conflict with the {{wikipedia|List of XML and HTML character entity references#Predefined entities in XML|predefined XML entities}}. If it does, you can either put it in a {{wikipedia|CDATA|CDATA section}} or use a non-interpreted version (e.g., <code>&amp;gt;</code> in place of <code>></code>).}}


The {{func link|cmdarg}} function is often useful in these situations to extract offset values passed to the binding. It returns the specific <tt>&lt;binding&gt;</tt> node, which contains a <tt>&lt;setting&gt;</tt> node at runtime if used in a joystick axis that represents the value of that axis.
The {{func link|cmdarg()}} function is often useful in these situations to extract offset values passed to the binding. It returns the specific <tt>&lt;binding&gt;</tt> node, which contains a <tt>&lt;setting&gt;</tt> node at runtime if used in a joystick axis that represents the value of that axis.


In joysticks and keyboard keys, the script is run in a specific namespace; please see [[Howto:Understand Namespaces and Methods]] for more information on namespaces.
In joysticks and keyboard keys, the script is run in a specific namespace; please see [[Howto:Understand Namespaces and Methods]] for more information on namespaces.

Navigation menu