coding

  1. L

    GMS 2 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...
  2. 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...
  3. 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...
  4. 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')) -...
  5. 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)
  6. 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...
  7. 7Left

    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))...
  8. Red Phantom

    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...
  9. B

    GMS 2 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...
  10. 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...
  11. 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...
  12. 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!
  13. 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...
  14. 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.
  15. N

    GMS 2 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: {...
  16. 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...
  17. A Random Creator

    Portfolio - Programming [Closed] Experienced GML programmer

    About me: Hello! My name is Isaiah, I'm 18 and I've been coding with Game Maker since ~2016 and consider myself experienced at doing so. I pride myself in completing all of my work as swiftly and professionally as possible. Requirements: Loose time restrictions: As I said before I always try...
  18. Christopher Risdon

    GMS 2 Help with a concept

    I need help with developing a shooting system for an array of enemy similar to that of a space invaders game. I need an adaptive system that can shoot in 4 cardinal directions based on player position. Say we have an array of 10x10 +++++++++ +++++++++ +++++++++ +++++++++ +++++++++ +++++++++...
  19. NovaOzuka

    Help Needed Coding Enemies

    I wonder how many topics I need to make before I can make a demo of my first platformer. Anyway, I now need help coding two different enemies, and hopefully I can figure the rest out on my own. The first is a Goomba type enemy, and the other is an enemy that can't be hurt by simply jumping on...
  20. NovaOzuka

    Custom HUD Help

    Right, so I need help coding my HUD for the game I'm working on, which needs to contain 5 things: Health Energy/Magic/Ammo Lives Currency Time FIrstly, I have no idea of what I'm doing, but I do know what I have in mind for each. For Health, I want upgradable Zelda style health. I'm using...
Top