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

    GameMaker [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...
  10. 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...
  11. 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...
  12. 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...
  13. 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"...
  14. 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...
  15. 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); }...
  16. Pfap

    Gms1 to Gms2 problem ds_lists

    This is the error I'm getting: ############################################################################################ FATAL ERROR in action number 1 of Draw Event for object chair: ds_list_find_value argument 1 incorrect type (undefined) expecting a Number (YYGI32)...
  17. phillipPbor

    Legacy GM card mechanic problem

    I went to look for help and with out the help of discord I would not make something like this. the cards are action cards... giving player an opportunity to perform. like kingdom hearts chains of memories. has 3 buttons, I use 2. there use, skip, and hold. but I came up with problems, one of...
  18. J

    GameMaker How to grab an object from a ds_list to use?

    I am trying to find an object in a ds_list, then read values assigned in variables within that object. Depending on the boolean variable "moving" I want to delete all the matching objects in the ds_list. Can I use something like: var tempobj =...
  19. J

    GameMaker Error/crash relating to ds_list commands

    Error Message on crash: "ds_list_empty argument 1 incorrect type (array) expecting a Number (YYGI32) at gml_Object_obj_player_KeyPress_87 (line 31) - if (!ds_list_empty(obj_eggspawner.eggslisttube1))"... Code in obj.eggspawner object is: "eggslisttube1 = ds_list_create();"...
  20. T

    HTML5 [Solved] GM2 works in Test platform but not HTML5

    Good evening, My issue is that my game works fine when operating under platform Test, however when I change to platform HTML5 it errors out. After a fair bit of searching I discovered that alpha doesn't work to well on HTML5 so I went through and removed all references of modifying the alpha...
Top