• 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!

coding

  1. N

    How to get Gamemaker to remember the last room you were in?

    I am trying to get Gamemaker to remember the last room I was in so that every time I enter a room I can choose the starting location based on what direction my character came in from. My first idea was labeling the lastroom = room right before I transitioned from room to room, but the first...
  2. Dr_Nomz

    GML Rectangles, drawing quirk (wtf)

    if (abs(mouse_x - x) < 48) && (abs(mouse_y - y) < 48){ draw_set_color(c_ltgray); draw_rectangle(x-48,y-48,x+47,y+47,0) So what this does is it creates a rectangle (duh), but the way it works is it creates a little square box on every CORNER from the center origin, meaning that instead of...
  3. I

    *SOLVED* Problem in my code, can u help me?

    hi everyone, My name is Johnny, its the first time I write on this forum. I'm experiencing some problems on my game code and I hope that someone can help me: since I coded the animations, my character does not move if the key arrows are pressed, while it moves only using space bar (it jumps...
  4. A

    Jump Animation Not Working with UP key only

    I ran into a problem regarding my jumping animation, and I can't seem to figure out what is wrong or how to fix it. All the other animations I have work great, and the Jumping animations also works great..... however, the jumping animation only plays when I jump while holding left or right...
  5. L

    GameMaker gui scaling trouble

    Hello, I am having trouble scaling my gui. so I have the automatic drawing of the application surface turned off, and am drawing the game surface manually and scaling it myself. for testing purposes i'm letting my game run in its native resolution ( no scaling ) and am centering it in the...
  6. 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...
  7. L

    GML anyone else here using gmk objects as structs/objects?

    Its pretty emphasized in game maker studio that, objects are literally like game objects ( game characters, items, enemies ) but does anyone use game maker objects as a way to create structures/skeletons as "objects in the code" ? Im currently trying to create a semi complex gui for this...
  8. T

    Having trouble with an error

    I am kinda stumped here and I don't know where to go from here any assistance would be greatly appreciated my code: 1: //Player Movement 2: 3: var xDirection, yDirection; 4: xDirection = keyboard_check(ord('D')) - keyboard_check(ord('A')); 5: xDirection = keyboard_check(ord('S')) -...
  9. P

    Reference Specific Point Of An Image?

    Had trouble googling if this code exist, I need to reference a sprite but a specific point of it. So my attempt was: image_index = spr_unit_form1(x+14,y+5); but this is an error, what is the proper way to write this? (google wasn't helpful)
  10. G

    GML Need help with game coding [Solved]

    So, i need help with some coding, i've been trying to make an moomoo.io like game, so the Hatchet or Axe animation is kinda hard, i tried everything, here's the code: //Object Axe //Create Event image_speed = 0; //Global left button Event image_speed = 3; alarm[0] = 90; //Alarm 0 Event...
  11. 7

    Having Enemy Problems

    So we are having a problem here at 7Left where the enemy wont get close to the player and it flickers about and teleports around the player. This is our first fully fledged game so we dont know much about coding. We will upload the code Enemy Step event: if (instance_exists(player_obj))...
  12. R

    GML How to minimise megabytes of game throughout development?

    Just a general question, in what different ways can I condense the data of my game so that it has lesser or minimal megabytes as the final? Some steps I already follow are: --Any sprite that will not be used in objects, create as a background instead --Convert any backgrounds into a...
  13. B

    GameMaker Terraria Style Platforms

    Hello, I am trying to make an object works like platforms in Terraria. If you didn't play Terraria it works like this. You can jump (or fly) below them to go top and if you top of them you can press down to go below them. But my collision system does not fit to this. My collision system does not...
  14. Liam Earles

    I need help with the Up and Down Axis Values!

    Hello! I am trying to code analogue stick controls to simulate the keyboard Up and Down buttons and no matter how hard I try when I test out my project for half of the time, the object always wants to go down. This is the code I have for when the axis value is moved: if gamepad_axis_value(0...
  15. Liam Earles

    Help! Using gamepad controls with Keyboard Events.

    Hey guys! I am currently trying to code gamepad controls to "emulate" the keyboard events. This is an example of a code of what I'm trying to do: gamepad_button_check_pressed(0, gp_face1) keyboard_check(ord('X')) What I'm trying to do is that I am trying to make a separate object to be as the...
  16. H

    Grass animation while walking question

    Hi guys, i'm stuck with a problem. I've done an animation that "spit" grass when you are walking. But i can't figure out how to let the animation stop when you're not moving, it stand there even if my character is not moving. How can i do that? Thanks for the future answers!
  17. A

    Brand spanking new

    Hey all, Just got GMS2 and while it's not my first time coding I'm pretty out of practice and will probably be on here a lot haha. I just completed the tutorial but wanted to add my own little flair to it: an end screen that tells you your final score and lets you replay the game by pressing...
  18. N

    Room Duplicate/Object copy to next room PLS help :D

    Working on a project atm to build a animation type program using game maker. So I'm trying to make a code that duplicates the room I'm currently in and or puts all the same objects from current room into the following room that already exists.
  19. N

    GameMaker need help with attack animation that keeps looping

    Hello everyone, i created a state machine for my character and am having a problem with my attack state, whenever i press the attack button my characters keeps on repeating the attack animation, here's the code incase it helps , thx ! switch (state) { case states.idle: {...
  20. A

    clock/timer?

    hello, i looked everywhere for something similar to what i am looking for, but all i found was a timer that goes by real time. in the game im making, you have 10 days to do what has to be done, and each day is 5 minutes real time. i did the math for timing but i dont know how to code it in. each...
Top