1. G

    SOLVED Saving Ds_lists not working

    I've been having issues with creating a reliable save system for the current project I'm working on. I'm trying to save an array which holds all the players stats, like an rpg. I already have ds_lists set up but I've had this consistent problem: Once I have the game, storing all the values into...
  2. samspade

    GMS 2.3+ Custom Sorting with Arrays in 2.3.1

    GM Version: 2.3.1 Target Platform: All Download: None Links: YouTube Video Summary: A GML tutorial series on (you guessed it) writing custom sort functions in 2.3.1
  3. MaxLos

    GMS 2.3+ 2D array causing memory leak

    ^^Title, I have a 2d array whose values are being updated in the Step Event and it's causing a memory leak. The project was ported over from GMS 1.x and it was working fine, I know they made some updates to arrays in 2.3 so maybe that's causing the problem? I'm not sure. settings[0, 1] =...
  4. H

    GMS 2 Array code is not working

    I'm trying to make this code move my player along a path that I make when I click my mouse down. So if I click the mouse and draw a circle, the player will move in that circle. But I can't even get it to run and I don't know if this will work. Any advice would be greatly appreciated.
  5. EvanSki

    SOLVED How do I auto-populate an array without defining what array position each item is?

    Im making an array that holds text and is set in a function. my question is how do i set it so i can move around the text and the array automatically fixes the position in the array the text is . I've tried this approach down here var i = 0; case 0:{ text[i] = "HELLO"...
  6. Kezarus

    GMS 2.3+ Memory Leak - 2D Array that stores another arrays

    If you have a 2d Array and stores another array inside it causes a memory leak. Just execute the code below in a Step Event a couple of times. It's that simple. @Rui Rosário, @FoxyOfJungle, @GMWolf, @kburkhart84, I found it. :bunny: @TsukaYuriko, @Nocturne, should I open a a Bug Report? Can...
  7. Kezarus

    Error assign a value to multi-dimensional Array

    Plain and simple, if I assign a value to a multi-dimensional array in a way it excludes an entire line. This gives the error: arrBuildings[point[0]][point[1]] = newBuilding; This doesn't: var coorX = point[0]; var coorY = point[1]; arrBuildings[coorX][coorY] = newBuilding; Am I...
  8. mmmmmmmmmmmmm

    [SOLVED] Loop not creating array or list of arrays as expected

    I'm trying to use a for loop to create an array of arrays and I have no clue why it doesn't work. The same problem is encountered if I try to use a DS list of arrays. A reproduction of my code is: var k = 4; var array; var list = ds_list_create(); for (var i=0; i<k; ++i) { var t...
  9. R

    GMS 2 How to organize levels menu data inside DS Grid

    Hello, GMC! I was following FriendlyCosmonaut's tutorials on YT about organizing menu data using 'DS Grids' and came across a problem - menu data is more or less hardcoded into these grids. But let's say my game will have 100 or more levels, writing out each level as an array would just be...
  10. xDGameStudios

    GML [TEXT TUTORIAL] Array Accessor Explained (@)

    GM Version: Studio 2 Target Platform: Windows / All Download: n/a Links: n/a [PROBLEM] When you create a reference of an array and edit it your original array stays the same and only the "copy" gets modified. [EXPLANATION] There are four different array behaviour you need to understand...
  11. G

    GMS 2.3+ How do I loop over an array?

    Dear GMS2-community, I'm trying to loop over an array using the following bit of code: Click event object Q: a[0] = 0; a[1] = 3; a[2] = 5; for(i = 0; i < 3; ++i; ) if(instance_number(global.obj_target[a[0]])=0){ instance_create_layer( xx, yy, "Instances", global.obj_target[a]) } But for...
  12. D

    GMS 2.3+ For Loop not working

    Just updated to the most recent version (2.3.1) and my For loops have suddenly stopped working and I don't know why. I found it odd that the new one I did wasn't working, even though I had one running perfectly fine last week or two, but even that one is broken right now. Checked the usual...
  13. FoxyOfJungle

    SOLVED Delete array value/item???

    There is no built-in function to delete an item from an array, just like we have in ds_list_delete(id, pos). (EDIT: This function was added on GMS 2.3.1) How do I delete 1 item in an array, but preserve the rest? And I need to delete this item anywhere in the array, be it the first item, the...
  14. K

    array_length always returning 0

    Hi everyone, I'm really confused right now and for sure this is a super noob question. I'm playing around wiht Game Maker after several years and I'm facing an issue that I can not explain myself. In my Create event I declared an array like this: myArray = ["Test","Test","Test","Test" ]; then...
  15. samspade

    GMS 2.3+ Is the argument array still necessary in 2.3?

    While you don't need to use the argument array if you want to pass in less than the max amount of arguments, as GM will provide undefined for those, I can't see away to get around it for an issue like this where you want to pass in an unspecified number of arguments (short of turning those...
  16. hisoka_2020

    SOLVED find an array length. array_length_1d() not working.

    As the title says, I need to find an array length but for some reason, game maker light refuses to accept array_length_1d() as a valid function. If someone could offer me help it would be much appreciated.
  17. G

    SOLVED Trouble Saving and Loading an Array using ds_map/list

    I'm just getting into understanding how to save and load my game and have had success with saving and loading single variables using the ds_map system, however I'm having many issues with doing the same with arrays. I've tried using ds_lists and searched around the internet for anyone else...
  18. William Garrison

    GMS 2 Change image_index based on array position

    So I have a basic dialog system. set like... string[0] = "Hi world"; string[1] = "How are you?"; string[2] = "I am well"; How do I check when "string" is at the position of "string[2]" so I can change a specific sprite index? I've tried array_equals and that just keeps telling me its not an...
  19. WasabiHeat

    SOLVED Creating a teleporter object and more about instance IDs

    Recently i've been trying to cut down on the amount of unnecessary objects in my game and one that i've been trying to cut down on is my teleporter objects. I want to make a single teleporter object where each instance of the object will have a "warpID" variable that's set in the room editor. If...
  20. DirectOrder

    Replacement for array_length_1d?

    I see that "array_length_1d" is now deprecated, but I can't find what you're supposed to use instead. How do you find the number of elements in a 1d array now? Do I just use "array_length"? It doesn't look like that one is deprecated, but I've found old pages of the manual where it shows...