• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

ds_list

  1. K

    SOLVED Setting and Changing Global Variables in DS Grid

    Let's say I have a global variable (global.var) that either equals true or false and I want to put that in a grid. If I use ds_grid_set, it's my understanding that the variable itself is not placed in the grid but rather its value is placed in the grid (true/false). So when I "get" that grid...
  2. Scienitive

    Can't Avoid Memory Leak

    I'm trying to write a function that does the same thing with instance_place_list() but not with one object with an array of objects. Here is the function: function instance_place_list_ext(_x, _y, _array, _order, _returnarray) { var return_count = 0; var i = 0; repeat...
  3. G

    SOLVED Saving Ds_lists not working

    I've been having issues with creating a reliable save system for the current project I'm working on. I'm trying to save an array which holds all the players stats, like an rpg. I already have ds_lists set up but I've had this consistent problem: Once I have the game, storing all the values into...
  4. VincentHellberg

    Legacy GM (SOLVED) Export DS_list as one string

    Hello GMC! I have a DS_list question. I've created a DS_list and now I'm trying to export it as text. More specifically to the clipboard. I've tried this: code = ds_list_write(global.custom); clipboard_set_text(string(code)); However, the text that are copied to the clipboard are around...
  5. huenix

    Issue removing spawn point form available list after taking it

    I am trying to make it so a connected player spawns on an available starting spot (its a board game). It currently works to place them at random points, but they CAN over lap players, i don't want that. How do i remove the available spawn point after "ojb_player" is crated at x/y? if (type...
  6. G

    SOLVED Trouble Saving and Loading an Array using ds_map/list

    I'm just getting into understanding how to save and load my game and have had success with saving and loading single variables using the ds_map system, however I'm having many issues with doing the same with arrays. I've tried using ds_lists and searched around the internet for anyone else...
  7. E

    GML Update multiple entries in ds_map

    I'm trying to update multiple entries in a ds_map, namely the value for AGE. The age is supposed to be added to a timer so it changes every time the timer fires. There will also be a "add baby" timer that will add more people to the list. I'm fairly new to GML and programming in general and I...
  8. P

    GameMaker Different DS_lists get same index

    So hello everybody, I am struggling with very strange problem in my code, my object has a variable Path, when I change the state (the step event script) of this object to my PathMovement it does this path = ds_list_create , but then when it executes this code in step event : var...
  9. FoxyOfJungle

    SOLVED "for" statement problem... (trying to make a dialogbox)

    Hi. I have a ds_list, it contains dialogs for my dialogbox. How I make: CREATE: messagebox_list = ds_list_create(); messagebox_show = true; messagebox_n = 0; ds_list_add(messagebox_list,"The quick brown fox jumps over the lazy dog"); ds_list_add(messagebox_list,"This is a long history...")...
  10. A

    GameMaker Memory Leak - Stack overflow (how to properly delete a list?)

    Greetings! I've been working on a system to house multiple dialogue triggers and to save them as they change. I finally believe I got it working-ish, (to save and load) - this is my process: I save a list, within my save function - ds_map_add_list(_map, "Dialogue_flags", global.dialogue_flags)...
  11. A

    SOLVED Saving a nested list mayhem!

    Hi everyone! I'm completely new to the list function but I figured this would be a good way to store multiple dialogue flags to save.. Can anyone offer some insight? I have the saving function of: ds_map_add(_map, "Dialogue_flags", global.dialogue_flags); (p.s. the flag is set to 0 within my...
  12. FeetUpGaming

    collision_rectangle_list returning undefined objects

    Hey so i'm making a rectangle select sort of thing for my game and i cannot get collision_rectangle_list to work. ds_list_clear(global.select_list); var count = collision_rectangle_list(_x,_y,_ex,_ey,build_object,false,true,global.select_list,false); show_debug_message("Col_Rect_List Found...
  13. S

    GML Huge FPS drops when searching ds_lists?

    I have the code below in the Draw GUI event, where Target is an instance id, and has a instance variable of Inventory which is a ds_list. When this is executed I get HUGE fps drops, and I'm fairly certain it's because iterating through the whole ds_list every draw step is very memory consuming...
  14. M

    Destroy ds_grid / map / list, even if they are local?

    Hi There Just short question. It's not that clear in the GM Help. If i have a local ds_grid like this: var grid = ds_grid_create(...) Do I have to destroy it after use as well? Thanks a lot! kind regards mX273
  15. sinigrimi

    GameMaker How to call a random key from ds_map?

    How do I call a random key from a ds_map structure? or will i have to create ds_list? a bunch of variables are created in ds_list, if for example I have 300 keys? I tried to do something with this, but my head is not working as it should var arts = global.artefacts; var arts_size =...
  16. sinigrimi

    still have questions about ds_list(I'm sorry that there are a lot of questions, I'm really a noob)

    but I have very, very many lines with creating objects. how can I effectively add them to ds_list. or maybe there are other options? I have a script in which there is the following: in the controller the following: in the scripts are switch systems in which everything is indicated in a...
  17. DirtyLibrary

    GameMaker Saving DS_LIST with nested DS_MAP?

    I'm relatively new to GMS2 and looking for advice on saving DS_LISTS that have ds_maps inside of them to an ini file. Adding the map to the list.. global.troops = ds_list_create(); entry = ds_map_create(); ds_map_add(entry, "type", "Knight"); ds_map_add(entry, "hp", 100)...
  18. emicarra

    GML What is causing memory leak?

    Hello, i made a simple server for my online game, and the task manager is showing it is slowly increasing memory usage, when i open the server the memory usage is about 18.000kb and after around 10 hours, the server reaches 200.000kb or more. There's always around 40 players online. All the...
  19. G

    [Proposed Script] ds_list_contains()

    The following script (and ancillary scripts) returns true or false depending on whether a value is present in the current ds_list. /// @function {bool} ds_list_contains(id,expression,[search_"whole_variable"=default_or_"words"_incl_num_or_"chars"_incl_digits]) /// @description returns...
  20. C

    GameMaker Ds_list displaying as -1 after doing a ds_map_destroy.

    hi guys, im getting a bit confused.... I am attempting to create a save file and Load the save file. the only issue I am having is the below: I am loading all my credit list from JSON file... it loads in perfectly. _wrapper holds the whole JSON file information...
Top