FANDOM


Description

Bind a script and funciton to the specified key.

int DXScript::bindKey(const char _key, const char* _filePath, const char *_functionName)

Parameters

Type Name Description
const char* _key The keyboard key to bind the script and function to.
const char* _filePath The filepath to the script, without the file extension.
const char* _functionName The name of the function to run in the script file.

Returns

Zero for success, nonzero for failure. For more detail of a failure, this function returns a member of the eScriptReturns enumeration.

Example

DXScript *dxscr = new DXScript();
dxscr->bindKey('W', "scripts/rebindKey1", "main");