ds_list

  1. 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...
  2. 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...
  3. 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...
  4. 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
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. A

    Storing items with lot of properties in an inventory

    Hi, I began GML a week ago, I'm starting a top-down RPG and my items have a lot of stats (bonus hp, defense, magic-fin, durability, quality, rarity, type, price, name, attack speed...), that I need to carry on easily each time I move items (picking them up, storing them in inventory or stash...
  10. Nathan Laing

    Legacy GM [SOLVED] Does each instance get it's own list?

    Greetings, The following code is called from say, "object A". There are other objects, and they are children of the object, "obj_parent". Does the code below create a ds_list inside each child object? Or, as I would like to have happen, is only ONE ds_list created inside the calling instance...
  11. T

    Legacy GM Adding DS_LISTs to DS_MAPs [SOLVED]

    I'm about to start writing the save/load system for my game using ds_maps and was wondering how I'd add an entire ds_list to a ds_map? The documentation says to use ds_map_write to store the list as a string and ds_map_read to transfer it to another data structure, but I'm getting this error...
  12. M

    Legacy GM [SOLVED] If a ds_list_find_index() doesn't find a value...

    I might just be dumb again, but i'm having trouble with reading values from a ds_list. Currently experimenting with a simple inventory system i thought of, and the part that i can't figure out is how the ds_list_find_index() function handles finding no free space when "picking up" an item. The...
  13. Simon Gust

    GML Fastest way to read / write using data structures

    I have some questions regarding data structures. I know that they are altered arrays with various features in them making them suitable for different situations. In my situation, I want to read and write a lot of data in a single draw. My idea was to use a ds_stack to push and pop data super...
  14. JacktheBlindRabbit

    GMS 2 [SOLVED]Problem with drawing ONCE

    Hey everyone! I'm making a food service game, mostly to learn game maker, but I've ran into a problem: I'm drawing the ingredients on 3 different spots (Left, Middle, Right) and for this I'm using a ds_list containing the current ingredient and a switch to draw them. When the ingredients are...
  15. V

    Legacy GM Recursive instance_destroy issue with ds_list objects

    So im working on a space game where ships are made out of parts. The ship starts with a core and then plates are added to the core, and to those plates more plates are added. When the core or a plate gets destroyed, i want all plates under that to be destroyed, and so on recursive until all...
  16. J

    [SOLVED] Issue with getting IDs of children using Parenting

    So in my last forum post I mentioned that I am basically making a list of objects that need to be deactivated rather than destroyed and then reactivated upon player death. The main purpose of this opposed to a room restart is to maintain certain surfaces in the room to show players where they...
  17. Luke Pierson

    DS Lists: find value and not position

    hey all! In my game, enemies will respawn if you use a checkpoint. Otherwise, enemies stay dead. Initially, I was using persistent rooms, but decided to go another route because I like to have control over the things happening within my game. Anyways, I decided to create a DS_list which...
  18. S

    Facebook Leaderboard ds_map / ds_list?

    Is there anyone that could help me figure out how to read and sort the facebook leaderboard? I have tried all kind of ds_map / ds_list, but i cant figure it out? This is how the response map looks like: { "data": [ { "score": 99, "user": { "name": "Donna sparw"...
  19. Luke Pierson

    Questions regarding ds_lists

    Hey GMC! Big question: So, I'm making an online 2 player game. So lots of people connected to the server, but when people want to play, they get paired with only one other player. To integrate matchmaking between two players, I send the server the username of every player that presses the play...
  20. G

    What happens when you clear a ds_list of ds_lists

    Given the following code: var master = ds_list_create(), list; repeat(5) { list = ds_list_create(); ds_list_add(list,0,1,2,3,4,5); //list contents do not matter ds_list_add(master,list); //why is there no ds_list_add_list? ds_list_mark_as_list(master,ds_list_size(master)-1); }...
Top