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

array

  1. Architheutis

    Keeping .ini-files despite of deinstallation app

    Hi buddies, :p now I am in the final cut-phase of my first big game. My game should be the first chapter of several. The gamer should be able to transfer his "earned" points, lifes and items into the next chapter, that must be installed. In case of a player unistalls the first chapter: Is it...
  2. C

    Finding the longest string in an array

    Im working on GUI right now and want to make sure the menu backdrop changes in size to fit the longest string in a given array. What function could I use to accomplish this? (I'm using GMS:S 1.4)
  3. S

    GameMaker 2 arrays with the same index?

    My game is pretty complex and would be probably confusing to people who aren't me, but I don't think I need to show much of everything else to bring up a bizarre bug that happened. This is the relevant code; cgv1 gets the variable for an array that stores information about a "skill" There are...
  4. clee2005

    Question - Code Array out of range

    Hey gang! I'm getting this error randomly from some users and am trying to figure out how this might be happening : Push :: Execution Error - Variable Index [0,2] out of range [5,0] - -1.mask(100160,2) My understanding is that it's saying my array var named mask is attempting to be accessed...
  5. wilmer

    Legacy GM Undo and redo the points of a path

    Greetings to all I have this doubt, in a Room I have several instances of objects that function as levels that when clicking click access to a different level and under those objects I have an open path with 46 points as if it were a path, as well as "Candy Crush", This is only for something...
  6. C

    GML [Resolved] Difficulty with arrays and for loops

    I'm trying to code a basic turn-based battle system where each character has a variable called "time," which, when it hits 0, allows that character to select a move (think ATB system in Final Fantasy in reverse?) I made a ds_map for each character, and then, for the battle system, made...
  7. FoufaDjo

    GameMaker help with changing array

    i want to go back to the previous selectrang but i got iligal use array error att selecting += (dkey-ukey); and idk what to do creat event: sl = 0; selectrang1[0] = 0; selectrang1[1] = 4; selectrang2[0] = 3; selectrang2[1] = 5; selecting = 0; step event: ukey = keyboard_check_pressed(vk_up)...
  8. S

    GameMaker (solved)Big data structure, easy to handle

    I need data structure with about 700 objects, every object needs to store 6 properties. I need to be able to change, get these values, and look for values through this whole data structure. What is the best way to make it? Ds_list, grid or simple array? If someone has time, please show me some...
  9. samspade

    Asset - Extension Array Functions Extension

    Available for GMS 2 Description This extension contains a number of functions to extend the usefulness of arrays. A number of the scripts accept custom functions. You can create custom sorts, custom array searches or filters, and more. Functions include: Extension Functions array_valid_index...
  10. samspade

    GML Utility Array Functions (now available for 2.3)

    There are a number of utility array functions I use and I've recently been taking some javascript courses so I wanted to formalize and add to those functions and make it a free to use utility package. I'll upload it to the marketplace at some point. If anyone wants to use them feel free, but...
  11. E

    Crossword Puzzle Design

    Hello All, I'm working on a crossword puzzle and I'm not sure how to begin coding. I have one main sprite with 26 frames, each containing a letter of the alphabet. I have an enum for themes. As in "animals", "places", etc. I have one array set up so far, which contains numerous animal types...
  12. S

    [Solved] When do arrays cause memory leaks?

    I'm currently working on a project that, according to the debugger has a gradual memory increase/leak, that's not too much of a concern until about 10 minutes into play. I have made sure that all ds_ data structures, surfaces etc are destroyed, and I'm under the impression that it has something...
  13. A

    GameMaker [Solved] Having trouble with the multi-dimensional array system

    I'm using GMS2 (desktop, windows 2.2.4.464, runtime 2.2.4.372) and I was working on updating some old code after a long time of not using GMS2. I was working with 2D array's, but after a bunch of errors I took a look at the manual and there I saw that the whole system had changed and that stuff...
  14. Architheutis

    ini-problems (no update and unpleasant list display)

    Hi programmers. I´ve got problems with ini-handling. I have a highscore table in my game. What I want: A saved highscore list on each unit - every time you restart the game, the ranking of the best players (TOP - 10) is reloaded. The list shows up to 10 names with the scores, vertically...
  15. R

    Isoloating and accessing one of the many objects created using a loop and an array

    I need to create many, many instances of an object but be able to refer to any of them individually in order to change the instance's properties. Using a simple for loop and an array I can generate all of the objects, but I'm coming unstuck when trying to target specific individual instances...
  16. D

    GameMaker [SOLVED] Array Trouble

    Hello, I'm currently working on a script to determine turn order for a turn-based battle system. Unfortunately, I keep getting the same error message, and I can't see how it's happening. Here's the code for the script: global.BattleOrder = 0 var templist =...
  17. 31Nf4ChZ4H73N

    how to read/save array out of json using json_decode [SOLVED]

    Im trying to store some date in a json and read the data out. however the game crashes whenever i try to read out the array. this is the code: var checker = json_decode(@' { "player" : { "name" : "Player", "array" : ["huhu","2we"] } }'); var inf = checker[...
  18. G

    GameMaker (Solved+) How can I refer to a variable/array/etc using an asset name?

    I'm creating an array of variables to track progress for each area in my game like so: area_001_state=[0,0,0] area_002_state=[0,1,0] area_003_state=[1,0,1] ... The first array position for each area could indicate whether the lights are on to start with, for example. Then when I want to...
  19. iChunkiMunki

    Are you tired of pointers left in your duplicated arrays?

    Hey guys, often when you are making a complex game we use arrays like objects holding many different variable types and even arrays. Sometimes we have arrays nested in arrays, nested in another array, ..... nested in yet another array. Is there a limit to how deep the rabbit hole goes? I often...
  20. Kaliam

    Bug, variable exists but these lines don't read it.

    So these variables aren't being recognized by the IDE for some reason, even though I am using them two lines afterward. I tried restarting the IDE and reloading the project but that didn't fix it unfortunately. My guess is that this is a bug related to the new warning system but i'm not sure.
Top