-
Notifications
You must be signed in to change notification settings - Fork 13
Next: CallGameScript
Calls a user-defined script within the global context.
Warning
Depending on how a game is structured, scripts may expect self
and other
to contain references to specific objects.
This method does not consider this, and invokes any script within the global context (with self
and other
both pointing to global
).
If you need to call a script within the context of a specific instance, consider using CallGameScriptEx.
RValue CallGameScript(
[in] std::string_view ScriptName,
[in] const std::vector<RValue>& Arguments
);
The name of the script, including the gml_Script
prefix, to call. Note that this parameter is case sensitive.
A vector of arguments, with which the script will be invoked. The arguments are passed in the same order as if calling the script from regular GameMaker code.
The function returns AURIE_SUCCESS
on success, otherwise returns a matching error code. For more information, see the CallGameScriptEx page.