Skip to content

Next: CallGameScript

Archie_UwU edited this page Oct 15, 2024 · 1 revision

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.

Syntax

RValue CallGameScript(
    [in]       std::string_view     ScriptName, 
    [in] const std::vector<RValue>& Arguments
);

Parameters

ScriptName

The name of the script, including the gml_Script prefix, to call. Note that this parameter is case sensitive.

Arguments

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.

Return Value

The function returns AURIE_SUCCESS on success, otherwise returns a matching error code. For more information, see the CallGameScriptEx page.

Quick Access

Documentation

Writeups

Clone this wiki locally