arrays

  1. P

    GMS 2.3+ What is the best data_structure to store Tile Info?

    Hello everybody, I have previously make a thread asking wheter structures(GMS 2.3) are good for storing info about tiles, and even without receiving a positive answer I decided to use them in the Level Editor to test before implementing in new Games. But now when I am done with Level Editor and...
  2. mcglubski

    GMS 2 Array for Collisions HELP! [SOLVED]

    Can someone help me simplify this into an array or something else? Even with years of experience with GMS I still struggle to understand simple arrays, especially after coming back to it since buying GMS2. I feel like this should be easy but everything I try doesn't work. If someone could...
  3. H

    GMS 2 Problem With Array list of weapons

    Hi, i have a problem with my weapons arrays. When i want to shot, my weapon ammo change from 5 to 4 and back to 5, then i can't shot anymore, when i change my weapon to a Bow, reload (auto reload) cant be completed and start over an over. When i reload, my ammo is subtraction from EQ but Weapon...
  4. flyinian

    SOLVED Receiving "unable to convert string to int64" error.

    I'm getting the error, "unable to convert string "Count 2" to int64" when I run the below code. I'm just learning arrays so, I don't fully understand how they operate yet. I am trying to create an array that checks to see if all the items in the array returns all zeros or not. var array...
  5. aristhemage

    SOLVED Saving and Loading Arrays (please dont 'dont use arrays, use ds_map' copy pasta me)

    Hi, I know, I know, don't use arrays to save, use maps. But the tutorials and help are all implying that the variable that stores the array isn't the core functionality of the game. I'm making a sandbox game and the way I have it is that there is a variable called world, an array worth about ten...
  6. Octopus_Tophat

    Am I doing this "arrays of arrays" correctly?

    So I have a script that returns an array of arrays. Not a 2D array, but specifically 2 separate arrays. My reason for doing this is a bit tricky to explain. It's for inventory management. Basically I am building this array with the script, and then looping through a list of instances, and...
  7. S

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

    Passing 2 argument with one DS

    Hello Everybody! Im new to Gamemaker 2 so and programming at all so i dont know if there was a way to pass 2 arguments in function with ONE data structure(of any type). I mean imagine for example that you have to create an object with fixed X and Y coordinates that are always same, but is there...
  9. MaxLos

    Legacy GM [Solved] Check if sprite index is equal to one of many array values

    So.. I'm working on a platformer/fighter and I have my attacks for my characters set up like this: //Create Event basiccombo[1,0] = spr_attack_1; //Sprite basiccombo[1,1] = 4; //Frame to chain into next attack basiccombo[2,0] = spr_attack_2; basiccombo[2,1] = 3; basiccombo[3,0] =...
  10. oturtmurr

    GMS 2 Trio Partner System - Switching Positions w/ Arrays & Warping Rooms

    Hello GMC! I’m working on a project dealing with a partner following system with 3 objects. It has 1 leader, and 2 followers. These 3 individual objects are persistent, and are stored in arrays that allow me to change who’s who. In this system, they are able to switch roles, just like in the...
  11. Drago the Shinigami

    GMS 2 [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 =...
  12. 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...
  13. Annoyed Grunt

    GMS 2 Is the array reference accessor supposed to be used outside of scripts?

    For the longest time, I believed that the array reference accessor "@" would only work inside of scripts and would be useless outside of them. After reading around and doing some personal testing, it seems however that the behaviour described for scripts - arrays are passed as references in the...
  14. 2

    GMS 2 Copy Each Tile in Tilemaps and Produce Copy Maps Later

    I need to collect data on what each tile is in tilemaps in order to remake the tilemaps later and perform a few operations on them. I also need to do this for how many ever tilemaps are in a room. Given that I have the data on which tilemaps exist in the room how do I store what each tile is...
  15. F

    GML How, when and where to use arrays and lists

    GM Version: GMS2 Target Platforms: ALL Download: N/A Links: N/A Summary: This is a GMS2 tutorial explaining first of all how to use arrays and DS lists for beginners. Followed by where and when to use 'em. Tutorial:
  16. E

    GML Cool program that lets you track points on your sprite, and also im a noob!

    hey all, i came accross this program called thundertracker that lets you track points in your sprite and turn that data into arrays i wanna use this to for a customization system (hats and helmets etc) in my game but i dont really understand the explanation they gave :c , and googling hasnt...
  17. Heavybrush

    GML [SOLVED] triple parallax starfield

    Hi guys, I have a new project, and I would like to figure out how to make a triple parallax starfield for now i made this: start event /// @description create starfield //inputs starField = 3; starDepth[0] = 100; starDepth[1] = 110; starDepth[2] = 120; stars = 0; maxStars = 1000; spd[0] =...
  18. L

    GML [SOLVED] Pseudo Room Problem - Space Game

    Hello all, this is my first post so apologies if this is in the wrong place or badly formatted. In my game, you fly a spaceship. This spaceship has multiple levels, but the ship as a whole stays in the same room (so your position in space and other objects in space don't change). I have sprites...
  19. R

    *SOLVED*mutli-switch locked door, need pointers!

    EDIT: FOR CLARIFICATION: IM USING GAME MAKER 1.4 PRO Hey all! Im making a re-imagining for a beloved PS1/Sega Saturn/3DO classic, "CASPER", and I have most everything figured out and working already (Item pickups, health, teleporting, basic switch and door functions, chests, locked key doors...
  20. aelyrin

    GML [SOLVED] Quick Array Issue...

    I feel like this should be pretty easy for most people to solve, but I can't seem to find an answer. I've searched through the manual and the forum to no avail, so I'm giving in and posting this. I keep getting "Assignment operator expected" and "malformed assignment statement." On the lines...
Top