ds_list

  1. N

    GMS 2.3+ Trouble with saving ds_lists and arrays to a struct based (json) saving system

    So I have done a video explaining things but the most important things are in the post itself. In the video I show the content of the json file though Hi, I have multiple problems using a save and loading system using json. My Saving code looks like this function SaveTest(){ if...
  2. T

    GMS 2.3+ Ds_list check problem

    I created a ds_list inside a global variable called "global.inventario". I succesfully created a code that make my items apear inside my inventory, the numbers rise when I get more items and decrease whe I use it, but, when it reach "0" I need it to be deleted of my ds_list. There is the...
  3. zenomex

    GMS 2.3+ Scan for specific object in range of another object

    Hey everyone! I'm trying to come up with a function that checks if a specific object is in range of the object the code is written in. I've read things such as using "with(all)", using a ds_list and having a variable in every single object... but I'm stuck and I'd like to know what is the...
  4. ashurlee

    Collision and Ds_list bug

    Can anyone see anything glaringly wrong with this code that could be causing collision checks to not always trigger? This code is written in the hitbox for the ability. I have tried multiple solutions such as increasing the size of the collision mask. Clearing the list on creation. Increasing...
  5. JasrielKraftuur

    SOLVED Setting Variables to Objects through ds_lists

    Hello. I am trying to create an inventory system that displays information based off the object you currently have selected. I've gotten the ability to show information to work, but I need to create a variable to set that value to. What I'm trying to do is print out this list of objects, the...
  6. 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...
  7. Scienitive

    GMS 2.3+ 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...
  8. 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...
  9. 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...
  10. 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...
  11. 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...
  12. Ekke

    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...
  13. P

    GMS 2 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...
  14. 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...")...
  15. Adry

    GMS 2 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)...
  16. Adry

    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...
  17. 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...
  18. 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...
  19. 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
  20. sinigrimi

    GMS 2 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 =...
Top