• Hey! Guest! The 39th GMC Jam will take place between November 26th, 12:00 UTC and November 30th, 12:00 UTC. Why not join in! Click here to find out more!

ds_list

  1. MCHLV

    GMS 2 [SOLVED]Storing sprite_index in a ds_map

    Hello, I am sure there is an obvious reason ... I can store sprite_index in a ds_list (and use for drawing later) But this does not work with ds_map... I have tried string / asset_get_index...<edit> it does in fact </edit> This works fine // create_event list = ds_list_create()...
  2. Elgarion

    GMS 2 [Solved] Scripts in ds_list

    Good morning everybody ! I need some help to figure out how to enlist scripts. I tried this : //=========== in my first room create global.My_List = ds_list_create(); ds_list_add( global.My_List, Scr_Sript1, Scr_Sript2...
  3. Bee

    GMS 2 Optimizing - ds_list question

    Hi all, I have a matching game (kinda like match 3) and it works well. However, over time the game slows down. I've done some debugging and refactored a tonne of code, but it still happens. Later on, but it happens. The matching creates and destroys a lot of lists, for every entry on the board...
  4. R

    Debugging - hierarchical preview structure of object with ds_list

    Hi, I'm trying to look into the more complex hierarchical structure of the object in debug mode, more precisely the ds_list which contains other instances and their variables. Is it even possible? It would help me a lot.
  5. Wretched.Dunce

    GML Game Crash On Collision with List Functions

    I'm making an asteroids-like shooter and I'm currently trying to get the speed value of an object before collission and calculate the "push back". I'm not using the built in physics engine cause I guess I hate myself, lol. However whenever two objects collide the game crashes saying...
  6. 3

    GMS 2 creating ds_list via script causes memory leak?

    When I create as ds_list and store it in a local variable in a script which returns this value does this cause a memory leak? example: script: createMyList var myList = ds_list_create(); return myList; objectList StepEvent if(mouse_check_button_pressed(mb_left)) { list = createmyList(); }
  7. T

    Objects Id connected to draw sprite

    Hello everyone. Have a cool person who used pseudo code to help me understand. I'm pretty sure im getting it but something isnt working right and Im not sure. Been reading in on for loops, with statements and ds_list for days. Been on this issue a little long and think it's time to ask for...
  8. Alloi

    GMS 2 [SOLVED] ds_map issue, creating a small database

    I'm creating a simple system in which people are created, then they are added to a database which has their ID, Village_ID, and Job Title. As well as a method to create villages. The problem I'm running into is that I had a ds_map value of "people" starting equal to an empty array [ ]. Then when...
  9. S

    Asset - Scripts repeat for_all

    So.. I made this a while back... noticed it's only on the old forums, so I'll post it here too. for_all This library adds the repeat for_all construct. The repeat for_all(x) syntax is an emulated language construct, enabling a foreach-like loop structure in gml. In many languages, there...
  10. V

    ds_list_size() returning wrong value

    Heya! As the title suggests, I'm getting a very strange bug when working with ds_list. In my gameplay controller object that is persistent, I create a global ds_list in the CREATE event with the following code: global.LEVEL_LIST = ds_list_create(); I also destroy the list within this object but...
  11. TheCheeseMaster

    GML Problems retrieving data from a ds_list

    Hi guys. I've been working on a system to allow the player to customize the key bindings to whichever keys they want. I've been successful in that once the keys have been changed, using those new keys in-game works fine. The problem I'm having is that when I exit and start the game again, and...
  12. M

    GML multiline chat using ds_list and for loops [Solved]

    Hello everyone, I've been using a ds_list to gather chat from my Twitch channel to make it look a little fancy. I've managed to access the chat to pull into gamemaker 2 and using the for loop function to separate them onto new lines per each person talking. I've managed to get the lines to...
  13. Dr_Nomz

    GML How do I save a ds_list to a ds_grid?

    I thought I knew how to do this, but lot's of testing shows I have no idea how to do this. for (var o=0; o<4; o+=1){ var _row = scr_DSGAR(save_blue_dialogue); save_blue_dialogue[# save_blue_dialogue_enum.option, _row]=option[|o]; } Basically it should just go through each and every value...
  14. C

    Issue when using ds_list instead of array. [SOLVED]

    I just recently, like ten minutes ago, reconfigured some code to use a ds_list instead of an array that I've been using. But it seems that when I want to access it it randomly crashes. So, falling blocks puzzle game. I've been storing all of the blocks (game objects) in an array and then...
  15. G

    Checking if a value of a Ds_list repeats in another Ds_list

    I'm not really sure if this is the most efficient way to check with every value of a Ds_list, if its value repeats in another Ds_list, but its just the way i came with (which isnt managing to work anyways), so i came here for some help to do some changes.... I have two objects, which IDs are in...
  16. P

    GMS 2 [SOLVED] Can I set the size of a ds_list without a for loop?

    I want to make a ds_list that is n values long. Can I do this in GML without using a for loop?
  17. P

    GMS 2 [SOLVED] Finding one value of a set of numbers in a single ds_list position

    I've set up a ds_list with each position of the list being coordinates. It looks like this: global.grad3 = ds_list_create(); ds_list_add(global.grad3, [1,1,0],[-1,1,0],[1,-1,0],[-1,-1,0], [1,0,1],[-1,0,1],[1,0,-1],[-1,0,-1]...
  18. Mert

    Android Efficient ds_list searching & getting

    Hi. I have a ds_list that contains 680.000 words. I alphabetically listed them (from A > Z) I also have a list that contains the words used before. Whenever I get a word from the main list, I add this word's position to my second list so that I know that this word was used before. What I want...
  19. C

    DS_LIST Scope

    Hello everyone, I've been searching for some info regarding variable scope for DS Lists. I'm sort of under the impression they are global. My scenario is that I have a number of instances in a room that are from the same object. I am setting them up so that they monitor a circle around...
  20. 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...
Top