gml

  1. Carbiner

    Question - IDE Debugger Missing Events?

    Hey everyone, So, while trying to figure out why a piece of code wasn't working (my missiles went boom, but they didn't hurt anyone), I put down some breakpoints in order to step through what was going wrong and found that the debugger would stop when the event was triggered, but no code would...
  2. S

    SOLVED (HELP) My asteroids in Space Rocks are glitching

    I made Space Rocks in GML and added a Collision event with other asteroids that makes both of the objects change direction: direction += 180; But when I hit them with my bullets they are glitching. I tried to add the variable collisionInvulnerability = 0; to the asteroid's create event and in...
  3. Evan Kinsler

    GMS 2.3+ How do you import an image as a background for a room?

    The title pretty much speaks for itself.
  4. yvodlyn

    SOLVED [HELP]Perfect collision problem

    Hi everyone, Can someone help me with this issue? I want to create a perfect collision for a bouncing player. However the collision do not reach the floor before bouncing. The player bounce 14px before it reach the floor. Create Event object player vspd = 0; //vertical speed vspd_jump = -14...
  5. D

    (Solved) How to move X and Y position of sprite in Game Maker Studio 2?

    In the tutorial it told me to add the sprite to the object and then add an event called step. The GML code i used in the step event is x = x + 4; to move to the right but when i run the game it does not move at all. I'm not sure what you mean by drag and instance but i created an object and...
  6. F

    GMS 2.3+ Hard times with scripts...

    Hello there (and please forgive me for asking something in the wrong thread, if someone can fix that mistake), I hope everyone's doing great these days. I am currently following a Youtube tutorial (you can skip the first half part): Yes, this is the part 2 but I have no issue with the part...
  7. R

    SOLVED draw_background() function not working properly in HTML5

    I have an issue with an HTML export, however this works flawlessly in a Windows compile. Problem: background change isn't detected in draw event. My draw event contains this piece of code: if surface_exists(surf_action) { surface_set_target(surf_action); //...
  8. yvodlyn

    GMS 2 [HELP] Character returning to start position

    Hi everyone! NEED: I want to make a game where the player can return back at his start position. However, I don't know how to create this system. EXPLANATION: When we click with the mouse button, the player will move to the nearest object or enemy (I KNOW HOW TO MAKE THE NEAREST SCRIPT). When...
  9. Nick Nishort

    GMS 2.3+ [SOLVED] Are instance method variables duplicated for each instance or not?

    Hello! It isn't entirely clear to me how the instance method variables work. For example I have the following code: // Object Create Event method_var = function() { // do smth... } Will "method_var" variable contain the copy of the function, which will recreated for each new instance (and...
  10. A

    GML How do I attach my weapon to my character if the model is 3D in a 2D space?

    Hello everyone, I recently replaced the 2D sprite of the gun I was using with a 3D model of a gun and ran into some problems. The 3D model was rendered from one side so that it could mimic a 2D object. Previously the 2D gun sprite was at least close to the character, but now it's pretty far...
  11. Plubu

    SOLVED Smooth Parallax Background

    Hello everyone, I've seen videos of how to code a Parallax Backgrounds, it worked for me but it's not smooth, when the player stops or just starts moving, the background ike cuts off or something, it's not smooth. This is my Camera object: //Create //Display Settings IdealWidth = 1920...
  12. A

    Help with running paths & timelines

    Hi, I imported a game made from GM Studio 1.4 into GM Studio 2.0, and learning GM 2.0. (FYI, I don't know much about GML) However, the conversion doesn't seem successful. In my game, with a mouse click, it was supposed to run action_path(), action_sound() and action_timeline_set() at the same...
  13. xDGameStudios

    GML [TEXT TUTORIAL] object.variable vs global.variable vs globalvar/macro structs

    GM Version: All Target Platform: Windows / All Download: n/a Links: n/a [PROBLEM] What is the difference between object.variable, global.variable and what are globalvar macros? When should I use one of the other?! [EXPLANATION] The first thing that we need to understand is that we are trying...
  14. face

    GML Programming basics in 20 minutes. (cheat sheet)

    GM Version: Studio 2.3 Target Platform: Windows Download: see code below Links: n/a Summary: In this tread I will teach you the basics of programing with GML. Attention: Useful information will be available here but you will need to use this regularly to get decent at it. What not to expect...
  15. Tiamat

    GML Trouble with collision

    I was programming to make the character only move horizontally while in the air(thankfully got that to work), but the collision with the character and wall is extremely weird. Horizontally, the character floats from the platform a few pixels away, and as it approaches the wall vertically, the...
  16. Luquemeister

    SOLVED breakthrough mobile version problem

    Hello every one, these days I've been trying to replicate the breakthrough game from the tutorials but for mobile, the main problem that i encountered is that I don't know how to make the pad stay in the game area and dont dissapear, I'm trying to implement the gesture event: drag start...
  17. C

    Player Not Respawning Correctly - Space Rocks Tutorial

    SOLVED! Hello, I've been progressing through the Space Rocks tutorial in order to familiarize myself with inherent GameMaker functions. For those who may be unfamiliar with this tutorial game: The base game is about just creating a spaceship which tries to shoot and dodge asteroids while...
  18. C

    GML Basic For loop for displaying 2D array not working when # of columns do not equal # of rows

    Just started using GML and am somewhat new to coding. I wanted to try to make a game menu that changes the color of the option you want to select if you used the arrow keys. I cannot for the life of me figure out why my For loops only work if the columns and rows are the same value (a 3x3 matrix...
  19. J

    Some instances working, others not.

    Hello there, second post. I plan to be quite active on this forum as I'm also teaching my niece GML. I'm having trouble with my instances, I'm making a platform game with ladders similar to donkey kong, but only some of the instances are working. In order to do the collision detection I have a...
  20. Evan Kinsler

    Can someone help me with making a simple menu navigation?

    The heading is pretty self-explanatory. I need help with making a simple menu where I can press the arrow keys and hovering sprites to replace the regular sprites. All of the code I have put into the project, I understand easily. Other than what I already put in the project, I need help with...
Top