However, it's possible to use Python or other programming languages for certain tasks within a GameMaker project by using external libraries or DLLs and interfacing them with GML. This typically involves more advanced programming and an understanding of both GML and the external language being used.
For example, you might write a Python script that performs complex calculations or handles certain data processing tasks, then compile it into a DLL. You could then call this DLL from within your GameMaker project using GML with functions like
Here's a simplified example of how you might interface with a hypothetical Python DLL in GML:
In the hypothetical code above,
"MyPythonDLL.dll" is the compiled Python library,
"PythonFunction" is the function defined within the DLL,
dll_cdecl signifies the calling convention,
ty_real is the return type, and there are two arguments each of type
ty_real passed to the Python function.
Keep in mind that interfacing with external languages adds complexity to your project and should only be done when necessary or beneficial to your workflow.