1. Daniel Mallett

    GMS 2.3+ Rename built in constants / macros

    This is a bit of a long shot. Is there a text file somewhere that stores the built-in constants without re-assigning them manually to constants with different names? Actually rename them. You can add code snippets by editing a text file. Hopefully, this can be done.
  2. zendraw


    so im creating a custom camera, will it constantly create cameras if i set the creation function to a makro or i shuld just create it with a global variable?
  3. zendraw

    SOLVED makro error

    so i have defined functions like draw_set_halign to macros and every time i startup the project i get the red ! dot warning with some message that you can see in the screenshot. if i modify the code, like remove ; then add it again, the red dots dissapear, the game also runs normally without a...
  4. S

    GMS 2 Define Empty Macros or Passing Arguments

    I'm currently starting to develop a game with GMS:2, I come from the old days of GM6-8.1. Before starting my development since I have a heavy C# background I would like to, C#-ify my code-base with some macros. For example, undefined in C#, would translate to null. So, naturally I defined a...
  5. Rui Rosário

    GML Multi-pass Macro expansion not fully working?

    Hello GMC, When using macros I expect that they will be fully expanded before any attempts on actual compilation of the GML code (like separate preprocessor and compilation phases). However I noticed that it doesn't seem to always be the case. For example: Create a new project and in the room...
  6. T

    Legacy GM Wierd Error with Expression Macros

    Hi, I am having this error that I cannot make sense of: I somehow narrowed the error to this line: global.DTBS_NUMBER[3] = DTBS_OTHER_NUM - DTBS_ENEMY_NUM; Or more specifically, the use of macro DTBS_OTHER_NUM. The macro is defined as follows: ... DTBS_OTHER_NUM | (DTBS_ENEMY_NUM+20)...
  7. H

    Question - Code [SOLVED... AGAIN] Ternary operations don't work in macros. Bug? No. Answer in post

    I tried to make a simple one liner singleton macro #macro IMGUI instance_exists(imgui) ? instance_find(imgui,0) : instance_create_layer(0,0,"Instances",imgui) But for some reason this doesn't work. Do ternary operations not work for macros or does this have something to do with the instance...
  8. S

    Anyone stumble into the delete macros and your project is wiped out?

    I've fallen into this trap quite a few times. If I delete a macro or add a macro once, add the same macro (same name) and then delete the extra, the project file won't compile. Then closing and opening GMS 1.4+ will result in the entire project being cleared out. The content is still in the...
  9. Cloaked Games

    GML [SOLVED] Passing Scripts/Macros Through as Arguments

    I am working on some scripts for terrain generation, and I have some functions which include arguments for a random chance of one instance changing into another instance. For example: "jen_change_change(obj_dirt, obj_sand, 50)" would turn 50% (about) of the dirt into sand. I was considering the...
  10. HayManMarc

    Using #macro's for layer ID's?

    Hello programmers, I'm wanting to make my room layers easier for me to see and write (in my code) so I was going to use #macro's for this. But I'm not sure which way would be better. Do you? At first, I was going to do it like this, in the Create event of a control object (where I do all my...
  11. GMWolf

    GML Keyframed Animations in GMS2 - GMWolf

    GM Version: GameMaker:Studio 2.1.3 Target Platform: ALL Download: N/A Links: Youtube Video Summary: Keyframes Are a great way to define animations, ranging from camera movements to GUI. However GMS2 does not provide an out of the box system to define them. In this tutorial, I present a way to...
  12. Blaize

    GMS 2 [SOLVED] Bitwise Setting and Clearing flags

    Hi guys, So I've just started getting into using bitwise operations and I'm just experimenting with a grid-based movement system. There are a few things I want to clear up: 1. Defining the bits - I've got them set as macros: 2. Setting flags in the play area Following the bits, these are the...
  13. Jezla

    Question - IDE [SOLVED] Compile Error Doesn't Make Sense

    I'm getting a compile error that is unrelated to the actual code it points to. Here's the error: Here's the script in question: The script is called in the create event of my main controller object. The error didn't show up until I added the following line to the controller's draw GUI...
  14. D

    GML Macro vs Variables for 1 Instance Uses - GMS2

    Hey everyone, I have a quick quiestion about the use of Macro/Constances within entites. I was always told that if you know a variables will not change you should make it constant, stop it being changed by accident & allows programs to alocate apropriate memory space for them. I have read in...
  15. G

    Question - IDE How to have Config specific macros like in 1.x

    I use to have many configs with their own specific macros values, but now I don't see how to achieve this with gms2
  16. xDGameStudios

     #ifdefined or #ifmacro or any other precompile check [SUGGESTION]

    Hi YoYo team and everyone! I would like to know if it was possible to add a #ifdefined or #ifmacro precompile check or another precompile check to check for use within extensions (I'm saying this because I think this is more of an extension development modular feature). #ifextension...
  17. T-bond

    Discussion Different macro values of different configuration

    The new macro definition method is super cool, and long wanted. But for now, I can't figure out the way how to change their value depending on the current configuration. In GMS 1.4 for every configuration selected there was a separate Macro editor, so for example I could toggle between the...
  18. R

    Question - IDE Where are the macros in GMS2(without hardcoding it)?

    I've seen that you can use #macro name value, but I would like to know where I can find this box that is shown in the manual.
  19. K

    Gamemaker macro error

    Gamemaker is giving me the following error whenever I try to load my game: FATAL ERROR in action number 1 of Create Event for object INIT: Unable to find any instance for object index '1' at gml_Object_INIT_CreateEvent_1 (line 45) - = "P99"; So, my INIT object handles all of my...
  20. G

    Legacy GM Using 2D Arrays and Macros to control character sprites

    Hello! This will be my first post here, and it's my first time using GML. However, I have studied numerous programming languages at University, and I'm in my junior year. So I have a fairly firm grasp on programming concepts and languages. Right now I am working on my first game, and I want to...