arrays

  1. 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...
  2. 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] =...
  3. sgrbgrddr

    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...
  4. 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 =...
  5. 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...
  6. 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...
  7. 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...
  8. 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:
  9. 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...
  10. 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] =...
  11. 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...
  12. 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...
  13. 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...
  14. FacesOfMu

    Accessing nested array variables

    Hi there, I'm looking for some guidance on how to access a variable that is nested in a 1d array of 1d arrays. I've run the following tests: arr = []; show_debug_message("\nTest 1: Print out this nested array"); arr[0] = ["a", "b", "c"]; arr[1] = ["1", "2", "3"]; show_debug_message("1...
  15. Pfap

    variable argument scripts

    I have been over the manual sections about scripts and passing arrays to scripts. Maybe I missed something, but I'm making this posting not because I'm having trouble finding a solution I already know of several work arounds. I'm making this posting, because I want to finally figure out how to...
  16. Gresse

    Windows Save data

    Hey I created a game in which the player has the option to play a mission (he has to reach a specific height with a limited amount of fuel(and other variables)) so because I don't have the time to manualy test all combinations of the settings and what height is possioble with them and all write...
  17. B

    Windows Arrays for RPG stats for each level?

    Hello, I am interested in making an array for each of my 4 RPG party characters to determine their stats. The array should go from level 1 to level 99, and use a calculation to determine the MAX HP, ATTACK, and MAGIC statistics for each level. For example, maybe they all raise by a flat value...
  18. ConstaChymic

    Discussion Strange array accessor behavior

    I think that how arrays are done in Studio 2's GML need some work, they act very odd (at least when compared to other languages), and I think the biggest tweak they need is to the fact that you can only use array accessors after a variable name, and pretty much nowhere else (to my knowledge)...
  19. B

    Legacy GM Networking sending arrays

    Hey I’m making a multiplayer top down shooter, and in the game I have many different guns. Each gun has its name, clip size, ammo in clip, max ammo, current ammo, player sprite when holding the gun, firing speed, damage per bullet, and movement speed. When a player dies or drops a gun, I...
  20. Edwin

    GML How to set an object to the array?

    Hello. I want to set all objects in room to the array. How to do it? And also, maybe whether it is possible to make so that one object did not repeat in an array? I want to make something like this on every vegetable in room, so player can pick it up. I don't want to make this on Draw...
Top