• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

creation code

  1. Tangerine

    GameMaker How to execute an object's creation code at room start before the creation of all instances?

    What the title says. I have an obj_layer_controller that creates multiple layers in their creation code using: layer_variable = layer_create(depth). Instances from other objects that are placed in the room in their creation code have references to layer_variable of the obj_layer_controller like...
  2. Z

    Room Switch Transition Issues

    So recently GMS2 had released a new update on the application and now the old fade scripts that I had created a couple of years ago are now completely obsolete. I tinkered around with the script hoping to find a breakthrough but sadly no avail. Facing little options, I have decided to reinvent...
  3. E

    GML Variable changed in creation code reverts back to what it was in create event

    I'm making a top down shooter and working on the enemy patrolling when it has returned to its start position, using a variable that was set to the patrol Path in creation code. When I run the debugger it shows that the patrolPath variable is set to 1 which is what I want it to be but when I...
  4. M

    How to creation code

    I want an object to spawn a different enemy depending on what value a certain variable has on the object´s creation code. That way I can save making another object. The problem is that in the normal code, I use the if variableName = 1 { "spawn the object1"; } else { "spawn the object2"; } The...
  5. jucarave

    GameMaker Is it better to have multiple game objects or multiple instances with creation codes?

    Hi everyone, I'm doing an RPG and I'm wondering on the best way to handle NPCs and items. I can do them like: 1. Having 1 game object "objNPC" and then changing the dialog and sprite of all the NPCs in my game using the creation code in the room. 2. Having 1 game object per NPC which inherits...
  6. Alphy

    GameMaker GameMaker Crashing

    Everytime I open the creation code of a room, GameMaker just crashes, any idea of why that happens?
  7. B

    SOLVED Help with issue related to persistence and event ordering

    I have an issue that I believe may be due to the ordering of events, but am not sure. The game I’m working on has the player moving through various rooms, and depending on which door the player enters the room from, where they spawn in that room will change. All the rooms are persistent, and the...
  8. D

    Instance Creation Code Keeps Deleting itself

    Hey, i'm not sure why but this all started happening recently. In some rooms (not all of them) anytime I try to add some creation code to an enemy object, the code will delete itself and I have no idea why. Any help at all would be greatly appreciated, thank you!
  9. R

    Windows Creation Code Bug?

    When I enter the creation code for an instance (pic 1), close out the creation code window and reopen it, the code is gone (pic 2). However, if I do the same thing (enter creation code, close it, reopen it) for another instance, it's fine - the creation code is still there when I reopen it (pic...
  10. N

    Changing the opacity of a Room layer in the room creation code

    I have an instance layer that is only in the beginning of the game that needs to have its opacity adjusted. It contains objects that are elsewhere in the stage, but the object (instances) itself needs to remain at 100% opacity for every other instance it is used in the game, therefor it's...
  11. V

    Default from DND to GML?

    I started my project, unfortunately, in DND a while ago. But now I know enough code that I want everything in GML by default. In previous version of GM2 my instance Creation Code used to come up in GML by default, but now it's DnD and it's annoying to have ot use Execute Code tool to do some...
  12. S

    Creation code in Instance creation

    Hi! Im serra and i don't have good english level, sorry for that, anyway, im making a game on, if you mine a (any object) you get (any item), but i don`t want to make a lot of items, i am questioning to make a single item and works for all items (stone, wood...) The problem is, i need to make...
  13. D

    Issues with DND with Creation Code

    I am working with my class on a Gamemaker Platformer game and we are wanting to drag and drop into the creation code. When I click and drag onto the creation code, nothing happens? How do you fix this or is anyone else having issues with it? Thanks. Version 2.3 of Studio.
  14. G

    GameMaker Question About Establishing Enums in GML Object Create Event Vs. First-room Creation Code

    [Sorry if this question has already been asked and answered. I searched and couldn't find what I was looking for.] Is it better to establish an enum in something like a rm_init (first room creation code) or is it safe to establish an enum in the create event of an object which is going to be...
  15. Null-Z

    GML trouble with creation code(SOLVED)

    I'm trying to make an object with empty variables in the create event that I can fill in the creation code event. After managing to get it running and not immediately giving an error, I found the object in question was not creating the desired object designated in the creation code. currently I...
  16. S

    GameMaker SOVLED Creating a creation code for generated object

    Hi, I wanted my game , when a Player coems to certain spot to create warp which will port him somewhere, but I need to create a creation code when it spawns. How could I code , that when creating that warp it will be created with creation code? I used this code to create Warp: var p =...
  17. D

    Mac OSX Finding room_id in creation code

    I have a grid containing duplicates of the same room with doors facing north, east, south, and west, that brings the player to the next corresponding room. In the creation code for the rooms I need their ids to find their location on the room grid to find their neighbors and if the are connected...
  18. Z

    Creating a countdown timer with Creation code?

    I have created a sentry enemy that fires at given intervals with the alarm variable however I feel like the alarms are too mechanical and mundane so I plan to set up an timer system as a creation code. I have a few ideas how to pull it off but the real trick is resetting the timer in the...
  19. C

    How to Update Creation Code Variables (arrays) During Run Time

    Hello, I'm having trouble updating some variables for my npc's talk code. I set the data for the variables within the creation code so I can use one npc object for all the npc's in the game, but when I make certain changes, the variable won't update to reflect the change. Here's how it works...
  20. W

    Reading global variable

    My save/load system was planned with a few functions extra to make the game interaction more interesting, one of this functions is to variate the main menu background when a global variable has reached a certain value. I coded all the fuctions in the creation code of the main menu room, but...
Top