gml

  1. aristhemage

    Windows [Gm2] How to use this jumbled code to my advantage, sandbox world with creating new blocks

    Hi all, with the help of another I have done some world generation for a sandbox game, here is how it generates. //World array global.world = []; global.worldArrayLength = 0; //First two layers for (var i = 0; i < 80; i++;){ global.world[global.worldArrayLength++] = instance_create_layer(i *...
  2. P

    Android Permission Error : Unable to obtain permission to execute

    Trying to import my game to my phone to test it. My computer has succesfully detected the phone so I can't understand what is wrong. USB Debugging is enabled in phone preferences. My replicated topic was banned, but I replicated it because I posted this one into wrong forum, I mean Simple...
  3. S

    GML ds_grid_get argument 1 incorrect type (array) expecting a Number (YYGI32)

    I have a couple of data structures set up beforehand: global.ItemIndex = ds_grid_create(Items.Length, Attributes.Length); // I have enums for these too. Inventory = ds_list_create(); // [Items.ItemName (since its an enum, int64), Amount (int64), Equipped (boolean)] When I run the code I get an...
  4. noorsalim

    SOLVED How to Colorize ds_grid_disk ?

    I'm making a Turn-Based Strategy (TBS for short) game and want to use ds_grid to store data of the grid and manipulate it later. Here is the basic code to create the grid and populate it with oNode objects: ///@desc Create the grid global.grid = ds_grid_create(room_width/GRID_SIZE...
  5. FoxyOfJungle

    GML Turn string into ******** password

    What is the most efficient way to turn a string into something unread for use in a password textbox? Example: Password: 12345678 Password in the draw_text(): ******** I tried to use string_format() and string_replace_all(), but I don't know if I did it wrong. Is using loops the only...
  6. GGJuanPabon

    GML overlap in collision 2D X and Y

    Can you help me please ?, I thank you in advance !!! I'm stuck I am using a perfect collision code, or so they call it on the internet. But I have 2 problems, an overlap in the ceiling, (which I solved with a validation but it does not seem the most optimal). and the second problem is that it...
  7. P

    InAccurate Collisions

    I have problems programming the game, it happens often when lots of collisions between moving circles happen in one moment. And maybe someone can help with borders physics: Now I just have different code for vertical and horizontal borders: dircetion-=dircetion //for horizontal borders...
  8. S

    SOLVED How to change the colour of an outline shader?

    I've followed Shaun Spalding's tutorial at youtube[dot]com/watch?v=zWrpHbc6fmc, which basically sets up a one-pixel outline for sprites using shaders. Currently, the outline is black. How do I change this? I've tried messing with gl_FragColor but it either messes up the transparency (no longer...
  9. GGJuanPabon

    GML FATAL ERROR convert string to integerin (Dynamic Select Character)

    I want to thank you in advance for helping me. My English is not native, I ask for excuses. I'm trying to create a dynamic state system for the character, based on the selected character. What I want to say is that all the animations of the character I have placed type NameCharacter_Jump. and...
  10. GGJuanPabon

    GML Mobile multitouch problem (Videogame Android)

    I have the multitouch problem (Videogame Android). There are only 3 buttons, Right, Left and jump. But if I touch right left I can't jump, and if I jump I can't walk, . Did you have a reference video? I searched but did not find a video. I have the following texts as a reference, but I have...
  11. D

    draw_rectangle function behaving incorrectly on scaled GUI layer

    Hi all, I'm having an issue drawing a rectangle with the Draw GUI event in GMS2. The game has a room size of 320x180, and I'm running a 1920x1080 window. Everything seems to work as expected except for the draw_rectangle function, which seems to add 1 game-scale pixel to the coordinates I give...
  12. U

    SOLVED instance_create_layer() seems incredibly slow in bulk

    So, I recently rewrote my game to use my own system instead of the built-in Room system so I could A) more easily transition between them without weird workarounds for the fact Rooms don't load until after you finish executing all your code B) use an external map editor to create them C) add...
  13. figures

    2D topdown tile collision, keep moving if not blocked in one direction when moving diagonally

    Hi, So basically I used an example 2D tile collision method from medium.com and have made some slight changes to improve it for my situation. It works great for 32px x 32px sprite and 16px tileset. I'm trying to figure out what I need to do to add "wall sliding": What I mean is basically say...
  14. FoxyOfJungle

    GML http_post_string: Can't get upload progress

    Hi! I am using http_post_string() to upload my "gamedata.dat" file to my server. It uploads perfectly and also downloads. On the server the PHP files and database are all working perfectly. The problem is that I can't get the file upload progress, just the download progress, which works...
  15. N

    GMS 2 Please Help Light up Certain Areas in the Room

    Hi, I have found tutorials for lighting up a certain object, to make the room around them darker and a small area around an object brighter, but I can't find anything regarding areas of the room, like coordinates. My goal is to have a lighting system like Enter the Gungeon, where if the player...
  16. netoxinaa

    SOLVED changing a color with a variable

    hello, I'm trying to draw multiple rectangles (each with a diferent color) on screen, one below the other, and I'm using the make_color_rgb() function to change the color by adding a variable as argument. I have the following code in the draw event: var i = 0; while (i != numberRectangles){...
  17. EvanSki

    SOLVED Mp_grid add tile instead of instance?

    I'm setting up a path-finding system using mp_grids, I'm very familiar with setting up and using mp_grids mp_grid_add_instances(id, obj, prec); using this we can add instances to avoid to the grid but I was wondering if instead of instances I could use tiles I'd like to start using tile...
  18. N

    room check

    I'm doing a game where I have gravity in a room and another does not, and that does not interfere with the player's movement. how could I make such a thing happen
  19. S

    How to generate collision masks for each sprite part?

    For my animations, I'm using a sprite sheet. This means that I use draw_sprite_part() and just change the X and Y to essentially move through each box in the row for it to look animated. I am trying to implement a hitbox and am having trouble generating the collision masks. I have a separate...
  20. S

    GMS 2 Define Empty Macros or Passing Arguments

    I'm currently starting to develop a game with GMS:2, I come from the old days of GM6-8.1. Before starting my development since I have a heavy C# background I would like to, C#-ify my code-base with some macros. For example, undefined in C#, would translate to null. So, naturally I defined a...
Top