Skip to content
This repository was archived by the owner on Feb 1, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions scripts/InputDefineCluster/InputDefineCluster.gml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ function InputDefineCluster(_clusterIndex, _verbUp, _verbRight, _verbDown, _verb

if (GM_build_type == "run")
{
var _callstack = debug_get_callstack(2);
var _previous = _callstack[1];
_previous = string_copy(_previous, 1, string_length("gml_Script___InputConfigVerbs"))

if (_previous != "gml_Script___InputConfigVerbs")
if not (_system.__verbDefineAllowed)
{
__InputError("InputDefineCluster() must only be called in __InputConfigVerbs()");
}
Expand Down
6 changes: 1 addition & 5 deletions scripts/InputDefineVerb/InputDefineVerb.gml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@ function InputDefineVerb(_verbIndex, _exportName, _kbmBinding, _gamepadBinding,

if (GM_build_type == "run")
{
var _callstack = debug_get_callstack(2);
var _previous = _callstack[1];
_previous = string_copy(_previous, 1, string_length("gml_Script___InputConfigVerbs"))

if (_previous != "gml_Script___InputConfigVerbs")
if not (_system.__verbDefineAllowed)
{
__InputError("InputDefineVerb() must only be called in __InputConfigVerbs()");
}
Expand Down
6 changes: 5 additions & 1 deletion scripts/__InputSystem/__InputSystem.gml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ function __InputSystem()

__androidEnumerationTime = -infinity;
__restartTime = -infinity;

//Flag for toggling InputDefineVerb() and InputDefineCluster() with __InputConfigVerbs()
__verbDefineAllowed = false;

//Master definitions for verbs
__verbDefinitionArray = []; //Contains structs for each verb definition
Expand Down Expand Up @@ -193,8 +196,9 @@ function __InputSystem()
];



__verbDefineAllowed = true;
__InputConfigVerbs();
__verbDefineAllowed = false;



Expand Down