list

  1. zendraw

    GMS 2 array to list

    can you copy an array to a list without manually looping thru?
  2. 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...
  3. XirmiX

    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...
  4. hughrock18

    GMS 2 [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...
  5. 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...
  6. Audun Paudun

    GMS 2 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...
  7. D

    GMS 2 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?
  8. RocketTo5

    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...
  9. Smenkare

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

    GMS 2 [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]...
  11. 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...
  12. 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...
  13. Carloskhard

    GML creating lists trough a script (Programming challenge)

    In context, in my game SIDERAL there're planets that are created procedurally.I've already code so the planets have variables which state how many of each thing they have inside (diferent types of terrains, buildings, objects...) : For example a desert planet could have a few sand mountains...
  14. Pfap

    [SOLVED]list size irandom undefined

    This sometimes returns undefined any ideas why? var x_list = ds_list_create(); var y_list = ds_list_create(); //get and remove from the list when getting values var o,k,free_spots; o = 0; k = 0; free_spots = false; var height = 9; var width = 8; repeat(height){ repeat(width){...
  15. T

    Help with ds lists and objects

    Hey All, this is my first post in the community. I hope it's clear for everyone to understand. So, I'm trying to place an Id for every enemy that my project has in the room at the start, I do it with the first paragraph of code that I'm showing here. // The variable auxId is created at the...
  16. LinkofLight

    Legacy GM Sorting a list without using arrays

    So I am in a interesting predicament. I have 15 variables called "order1_x" and the 1 is replaced by every number up to 15. These variables can hold a value from .1 to 30 and the numbers are always a rounded to the first decimal place. I have used these variables all over my code and its a bit...
  17. LinkofLight

    Legacy GM Sorting a list without using arrays

    So I am in a interesting predicament. I have 15 variables called "order1_x" and the 1 is replaced by every number up to 15. These variables can hold a value from .1 to 30 and the numbers are always a maximum to the first decimal place. I have used these variables all over my code and its a bit...
  18. FacesOfMu

    How do you solve "index out of bounds" errors?

    Do you have a special method or tip on how to solve "index out of bounds" errors? Do you know a neat trick on cutting your investigation time? Please post your GMS2 list and grid access tricks! Pre-reading...
  19. L

    Solved

    Someone delete this, I have no idea how to do it.
  20. Carloskhard

    GML using alarms cuz code in create event don't run inmidietly.

    So my problem is that a lot of code in the create event dont seem to activate inmidiatly. For example: I have an object that creates a ds_list. Then another one that create an instance of that list in his "create event", however I got a problem saying the list was not found so I have to tell...
Top