GM Version: GMS 2+
Target Platform: ALL
Search for items in an array. I write a string, and it will find all items matching the search.
Do you want to make an inventory or a list of some store/shop or a highscore list and want to...
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...
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...
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...
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.
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...
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?
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...
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.
And i have these weapons like...
I've set up a ds_list with each position of the list being coordinates. It looks like this:
global.grad3 = ds_list_create();
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.
Here is the script which has the debug messages shown on the first 2 lines in the quote...
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...
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...
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
o = 0;
k = 0;
free_spots = false;
var height = 9;
var width = 8;
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...
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...
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...
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!