void myFunction(FunctionContext* context) { ParamList params = context->getParams(); int myParam = params.getInt(0); // Do something with myParam... }
void myOtherFunction(FunctionContext* context) { ParamList params = context->getParams(); float x = params.getFloat(0); float y = params.getFloat(1); float z = params.getFloat(2); // Do something with x, y, and z... }In this example, the getParams function is again called within a function, this time myOtherFunction. The parameter list associated with this function is retrieved, and the values of the three parameters (at indices 0, 1, and 2) are retrieved using the getFloat function. These values are then used in some way within the function. Overall, the getParams function is a useful tool for working with function parameters in the Aurora NWScript library for C++. Its usage is indicative of the overall usage of the package, which is focused on providing functions for building games within the Aurora engine.