• 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!

list

  1. C

    How to scroll a long list iterating 10 elements by step, starting from the end?

    I would need to iterate a part of the list at a time so as to always have the same workload despite the length of the list. I don't have to delete items from the list, but just read it completely in several steps. I've tried this for now but the list seems to be read incorrectly or not entirely...
  2. Baner

    GML A list that stores a chain of combos in a fighting game?

    Hi, friends! I have a typical fighting game where each key makes a different move, and a variable that stores the last move used by the character. last_key = "LK"; //low kick in this example I want to replace this variable with a list that stores the different keys used during a combo, in...
  3. RizbIT

    GML Use Structs or Lists

    Structs are new to me and i have not really used them before in GMS. But I have read up on them and they seem quite versatile. But I am trying to decide if I should use Structs or Lists for what I am doing. I am leaning towards using lists because you can easily load and save their values...
  4. Dimsum Cart Studio

    SOLVED Weird bug about structure.

    I use " collision_circle_list " to record the enemies player meet, list named " enemyList ". Everytime before using " collision_circle_list " ,I will destroy the " enemyList " and use ds_list_creat() to reset the structure. But when I read " enemyList ", sometimes it shows the bug ( not...
  5. Staral

    Confusion on how to create "tables"

    Hi, I have been looking for a way to do this but I cannot seem to find anything. What I am looking to achieve is kind of like a table in a document, only in gml. This concept may be confusing so I will attempt to explain in full detail. | Item ID | Var1 | Var2 | | 1 | int | int...
  6. hans

    SOLVED Storing multiple variables into one position in a list

    I am making a card-based game where I want to store the position of the cards in the player's hand in relation to the GUI. I've tried saving structs with all of the relevant information in them to a list however I can't seem to populate the list with them and retrieve them later. Is there a...
  7. Daniel Mallett

    Copy struct

    Been going round in circles on this for days now. I can't figure out a clean way of extracting (The data only) from a list. I have a list that contains a list of structs. I want to copy the (data) from here to an array containing lists that store a struct. list[| 0] = struct data array[0] =...
  8. FoxyOfJungle

    GML Search Items In An Array (for inventory)

    GM Version: GMS 2+ Target Platform: ALL Download: N/A Links: N/A Language: GML Summary: Search for items in an array. I write a string, and it will find all items matching the search. Tutorial: Do you want to make an inventory or a list of some store/shop or a highscore list and want to...
  9. Z

    GameMaker array to list

    can you copy an array to a list without manually looping thru?
  10. 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...
  11. X

    Legacy GM What happens to lists and maps in these instances?

    Wondering what would happen in these cases to lists and maps. Picture that they are in a script, and when a script is called with either of these pieces of code in, I'm interested in knowing what will happen in terms of garbage collection; will the list or map be destroyed or hang around filling...
  12. hughrock18

    GameMaker [SOLVED] ds_list_mark_as_ behavior question

    Hello fellow devs! I am building a complicated save system (will be so much fun when done), and part of my system relies on the use of ds_list_copy (ex. copy the "char_data_list" to "var _temp_list". Grab one of the many ds_maps held by the list. Change values of said map, and then save to...
  13. giraffeman210

    Opinion Top 5 Indie Games

    I like making top lists and since a lot of us here are making and playing indie games I thought I would list my top 5 must play indie games I have discovered. I'm sure there are many more great ones than these but if I was to recommend some these would be the five I would recommend first. 5...
  14. A

    GameMaker Need help with ds_list

    Hello! I'm making a grid based game kind of like tetris only without the gravity. The player places tiles onto the grid and gets points when rows/columns are full of tiles. When a row(s) is full the game populates a list with the ID's , coordinates and colors of the tiles in said row(s). The...
  15. D

    GameMaker Data structures: get value from the list of maps

    Hello! Lets say I got 1D Array of Maps. Map contain key="id" and some value. What I want is to defind list element using map's id value. For example: ds_list_find_value(list, map[? "id"] = 1) Is there any way to do that?
  16. R

    Pretty Looking Score System

    Hi, in my game I have a number of ways to increase your score at the end of the level. You can increase it by defeating enemies, beating the level in a short time, and losing as little HP as possible. Now when you finish the level, you go to a loading screen for the next level, and in this...
  17. S

    How to contain all the data

    My every weapon, every piece of armor has different stats and sprite animations. I dont know how it works in gm and what its the most efficent and easiest way. My sword for example has 4 different variables. sword.animation sword.damage sword.equipped sword.clicked And i have these weapons like...
  18. P

    GameMaker [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]...
  19. Pfap

    list does not exist

    I am creating a list in a script and filling it with data, which I later access from an object. I don't get the error when accessing from the script, but later in the object it crashes. Compile output: Here is the script which has the debug messages shown on the first 2 lines in the quote...
  20. T

    DS list of all of a certain object live in game

    Hello. I need to make a DS list of all the "obj_object" objects currently in my room so that I can reference them all individually in my code. How would I go about doing this? This is so that they can reference each other. Also when the object dies it also needs to get off the list. Is this...
Top