• Hey! Guest! The 37th GMC Jam will take place between May 28th, 12:00 UTC and June 1st, 12:00 UTC. Why not join in! Click here to find out more!


  1. F

    How would I update a ds_grid with data that I have stored in a ds_list?

    I pulled data from a ds_grid and stored it into a ds_list so, I can shuffle and change the values stored in said list. Now, since I am done shuffling and changing the values within the said list, I want to update the grid with the new data in the list. How would I achieve this? either code...
  2. K

    GML About variables and global variables

    I wanna know about the difference between them, is that variables are attached to the object only, and you can't use it in another object and global variables are available across all objects? I don't know if I am right.
  3. Binsk

    Asset - Scripts UBG Simple Health Bars

    Would you like to be able to throw together some health bars as easily as possible? Do you also want flexibility so they can look just like you want as well as documentation to show you how to get there? Well perfect, you found what you needed. Yoyo Marketplace (Fix your site, Yoyo) Upset Baby...
  4. F

    Looking to receive loop assignments for practice.

    I would like to receive assignments from you that involve loops. Mainly for loops. It would also be nice if you could look over the assignments and give me feedback. Types of assignments I'm looking for: 1. Broken loops that I have to debug and fix. 2. Create a loop with an outcome in mind. 3...
  5. KyleRansford

    GMS 2 How to "Reserve" a Controller Slot for Player 1?

    I have my game setup where if there are more than 1 player, they can each use a controller. But, how would I "reserve" a controller slot for player 1? Since the way I currently have it working is, that in 1 player mode, the 1st player can use either the keyboard OR a controller. But, because of...
  6. F

    Need help with my combat system

    I am planning on taking this step by step and getting the code to work before moving to the next section. Hopefully, this helps to break it down so, it's easier to understand what is going on. I am currently trying to have the list to check if it has any dead enemies and if it does, add those...
  7. F

    SOLVED Receiving "unable to convert string to int64" error.

    I'm getting the error, "unable to convert string "Count 2" to int64" when I run the below code. I'm just learning arrays so, I don't fully understand how they operate yet. I am trying to create an array that checks to see if all the items in the array returns all zeros or not. var array...
  8. F

    SOLVED Assistance with code help

    I am trying to add randomization to my combat system and experimenting with different code styles. When I use "var enemy" or "totalcounttarget" directly to adjust the value of "Count 1", it doesn't work. If I use the "Count 1" directly, it works but, I lose the randomization for my combat...
  9. William Garrison

    GMS 2 Sound playing every step. (need to stop that)

    Okay so simple enough I want a hover sound to play when the characters HSP (horizontal speed) is > 0. So if this is the case and its HSP > 0 then I set the hovering var to be true. Otherwise its false. Once hovering is true I do the following (hovering code included). PLAYER - CREATE hovering...
  10. Carloskhard

    GMS 2 Can't use shader inside surface

    So is this something related to GML? I have a surface that I can draw with a shader, but if I draw that surface inside another surface, the shader doesn't apply. Any insights?
  11. F

    SOLVED increase the value of a ds_map

    How would I increase the value of a key in a ds_map? How would I increase this value in a step event? How about a key pressed event? ds_map_replace(enemyinfomap,"Count1", 1); Thank you.
  12. F

    SOLVED Randomize total damage between several enemies.

    I'm trying to get the damage value to randomly split its number between several enemy's health. I've attempted to use choose and random functions but, wasn't successful. I've also tried storing the unit's variables into another variable and using that in code. I am trying to take the value...
  13. GGJuanPabon

    GML How would you make this transition smooth?

    Hello friends, I would like to make a smooth transition similar to what this demo has: https://pixel-frog.itch.io/pixel-adventure-1 Please let it load and click on Reload: You will see a transition in the form of diamonds. I would like to do something similar, but I have no idea where to...
  14. TheOnlyWRT

    Creating a bullet relative to a rotated sprite

    Hello! I have a top-down shooter where the player shoots towards the mouse with both the player and bullet sprite rotating towards the mouse. However, I am trying to get the bullet to spawn at the tip of the gun on the player's sprite, but I am having a real hard time doing that. The code I...
  15. Kiwi

    GMS 2 How do I make an object move in a semicircle?

    Does anyone know the formula to make an object move in a arc, like this: I'm trying to make a walk cycle where I've got two boots, and the code on them gets triggered depending on how far the body's x pos is from the boot's x pos. I attempted to do it with states and IF statements, but the...
  16. conman06

    Rooms not working

    I'm trying to program my game to go to the next room after the door animation plays, which is activated when the player presses up arrow. I don't understand why it isn't working.
  17. Toborochi

    GML About script_execute performance on Step Event

    I recently did a little experiment with a FSM. I don't know how script_execute works below, so my question is: Is it good practice to use it in the Step Event? Here is the link to the project on github: Github Link Basically what it does is change the script when it changes state and execute it...
  18. GGJuanPabon

    GML Dust effect, or trace when walking and removing an object

    Good day friend. I am a beginner of Game Maker, I am making my first game in GMS2. I would like that when my player picks up the fruits, diamonds, coins, etc, it disappears and leaves a trail that 1 second later disappears. Something like particles, but I already have the animation in sprite...
  19. U

    GMS 2 Check all objects

    Hey, i was wondering if the is a way to check if one variable is equals to 1,for example, in all objects of one type: if(all of object one type.variablenamehere==1){ then do something }
  20. R

    SOLVED Enemy Keeps on dying Before health is out. (Variable Problems) and (Parent Child problems)

    Hello, I am having trouble with coding. I have 2 objects Enemy (the parent) and Baddie (the child) that work hand in hand to subtract health every time a bullet hits the baddie. the baddie health is set to 50, but the xl (the value that the baddie health will replace) is set to 0; whenever...