• Hey! Guest! The 40th (!!!) GMC Jam will take place between February 25th, 12:00 UTC to March 1st 12:00 UTC. Why not join in this very special anniversary jam! Click here to find out more!


  1. A

    GMS 2 Iterating through DS List Works when Debugging only [Solved]

    I have encountered a bug in my code when I attempt to iterate over a ds_list containing objects returned from a json file. When the application runs normally this error appears, as well as when I debug the code and hit F5 to move to the break point after the for loop (the error on line 23...
  2. J

    Creating a DS_list within a list and loading from that list

    Hi all, I have figured out how to do saving and loading for a position within a ds_list with the help of Shaun Spaldings excellent tutorial Saving to position 0 var _root_list = ds_list_create(); var _map_player = ds_map_create(); ds_list_add(_root_list, _map_player)...
  3. T

    DS list of all of a certain object live in game

    Hello. I need to make a DS list of all the "obj_object" objects currently in my room so that I can reference them all individually in my code. How would I go about doing this? This is so that they can reference each other. Also when the object dies it also needs to get off the list. Is this...
  4. W

    Legacy GM Drawing Object sprites from a ds_list[solved]

    I need to draw the sprites of objects I store in a list but every time I try for some reason my inventory object draws my sprite above the object writing the code no matter where I put the y value. I'm just doing a loop and drawing whatever's in the array at the checked position if there's...
  5. W

    Legacy GM [solved] Difference between ds_list_add and ds_list_set?

    I just started working with ds_list and I'm looking through the functions but I don't get what's the specific practical use of ds_list_set compared to ds_list_add. It says if you use set to put a value in the list outside the size of the list, it'll just create the indices needed to reach that...
  6. D

    Help with enemies's position

    How can I make the cursor jump to the next enemy checking if the next enemy its alive or not? I saw a stream where the guy used ds_list to do that I want, but doesnt explain how this works :/
  7. C

    Legacy GM How many max values can a ds_list hold?

    Title says it all. Is there a maximum amount of values a ds_list can hold? If it's something low like 15, is there an alternative to list that has a high maximum amount or infinite values. I wont be needing something like quintillions or so something to check which all servers the player has...
  8. F

    Passing a ds_list as parameter to an extension function

    Hello, I'm writing an extension for Android (which will be also ported to iOS and Windows). I need to pass a ds_list as a parameter of a Java method. How would I do it? In GML I would pass the index of the ds_list as argument to the function. But how do I access the values of the said list in...
  9. Pfap

    ds_list inside ds_map

    From my quick overview of the manual it seems to state that ds_lists and ds_maps should only be combined when working with json. Is the manual only talking about data that would need to be saved? I did some tests and what I have works, but is it a bad idea to use it like the below? Create...
  10. Q

    Object IDs stored in ds_list result in <invalid instance>

    EDIT: With a little more digging, it looks like this only happens when I change rooms after creating the ds_list. Is there a way to mark a ds_list as persistent? EDIT2: Duh! The objects IN the ds_list weren't persistent, so they were getting destroyed when the room changed. The ds_list still...
  11. Z

    Multiple Collisions Based On Z Axis

    Hi GMC ! For my game in fake 3D, I coded collisions with objects on the x axis and y axis ("normal" collisions). For the "jump" function, I need to set collisions on differents levels of floor. To do that, I created an object named "LEVEL", which take the depth of its layer and use it as z...
  12. Amir Bayareh

    Sorting objects by positions.

    Hello everyone! I am creating a little race game where 4 objects are racing each other. I want to give each object its own place (1st, 2nd, 3rd & 4th) depending on their actual position. But I've been strugglin for a while now. I think that I can do it by creating a ds_list and sorting it by...
  13. Bee

    GMS 2 variable_instance_set, but the variable is a ds_list

    I'm hoping there is a solution to this... I have a bunch of ds_lists that hold two values each. Then I have a json that refers to the ds_list names. So in order to adjust the values in the two list positions, how do I access them? I'm assuming I need to use variable_instance_set since the name...
  14. M

    Legacy GM How to assing hierarchical value to variables without repeting positions

    Hi, I'm having trouble making a position system in a race game. What I was expecting is that if any of the four players, for example Player A, hits the lap detection zone first he will be in first place and if Player B hits the lap detection zone next and both have the same ammount of laps...
  15. C

    How to Flush Memory in GM Project

    Hi Everyone, I'm working with ds maps and list for saving objects and while I was messing around, I believe at one point I caused a memory leak before getting the code back to normal to try another approach. With that said, the normal working code will not produce the JSON list, but if I start...
  16. F

    ds list trouble

    OK here i go... so.. since i could not find this anywhere on the internet i decided to ask here. i have a ds list where i would need to add like 2000 words in it. is there a simple way to do it since adding every word individualy would take lots of time and unneccesery space. ty in advance =D
  17. A

    GML How to send large amounts of data over network at start of connection?

    I'm developing a multiplayer game in which the map changes frequently during the course of the match. To be more specific, I have a ds_list server-side that contains all the values of map objects that need to be destroyed. Everything so far is working, as the objects can be transferred to...
  18. bbbower

    Legacy GM [Help] ds_list_find_index - compare array?

    I've simplified my code example. Basically without using a for loop... I was trying to use ds_list_find_index to determine if a pair of coordinates were already inside the ds_list so that duplicates did not get added. Gamemaker says that values inside of a ds_list can be an array. However...
  19. M

    Legacy GM returing a boolean for ds_list_find_index

    I'm trying to check and see if I already have an objects ID in my data structure list. My code follows this logic tile = ds_list_find_index(list, obj to checking); if variable tile does not find anything { somebody=1 toucha=1 my=1 spaghe=1 } what number will...
  20. G

    Legacy GM [SOLVED] ds_list remove duplicates and keep them

    Hi! I was wondering if you can remove duplicates from a ds_list? is there a built-in function for that? for example if I have the following ds_list values [3, 4, 5, 11, 11, 11, 13, 13, 13] // indicates ds_list values how I can only return [3, 4, 5, 11, 13] // indicates unique ds_list values...