ds_grids

  1. MeanLikeCharlieSheen

    GMS 2.3+ ds_grid inventory check for item (crafting)

    Okay so my inventory system is based off of friendlycosmonauts farming rpg series - long story short i've been trying to get a little crafting system going were when i press the craft campfire button it checks inventory for enough wood then removes the wood and drops a forge item on the ground-...
  2. G

    GMS 2.3+ Problem with #

    Dear GMS-community, I'm getting to grips with data_structures and don't understand why scenario A does work and scenario B doesn't. As far as I can tell only the x and y coördinate for the grid AllAgents have been swapped. (I prefer to have scenario B.) Scenario A function...
  3. 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...
  4. flyinian

    SOLVED Would I be able to use inheritance w/ enum and ds_grid while having each child have its own?

    I have a parent with enum and ds_grids. I then have multiple children of said parent. In that parent, I have enum and ds_grids created. The enum are used in the grid for clarification instead of the standard numbers. Can each child use the enum and ds_grid created in said parent separately...
  5. S

    GML ds_grid_get argument 1 incorrect type (array) expecting a Number (YYGI32)

    I have a couple of data structures set up beforehand: global.ItemIndex = ds_grid_create(Items.Length, Attributes.Length); // I have enums for these too. Inventory = ds_list_create(); // [Items.ItemName (since its an enum, int64), Amount (int64), Equipped (boolean)] When I run the code I get an...
  6. Slothagami

    SOLVED ds_grid_sort with two columns?

    I am making a leaderboard for my game (using networking, GMS:2) and I'm new to ds_grids I want to sort it so that the player with the highest killcount is at the top, and if two or more players have the same score their order is decided by health e.g: player1 has score of 2 and 6 hp player2 has...
  7. S

    GMS 2 Query regarding ds_grids and passing info to a var

    Hi guys, I'm finally taking the dive into game development and had some very limited experience with GML about a decade ago during the GML 5.1 era. I used to do some (pretty bad) sprite work for a friend back then so unfortunately I don't have a ton of experience with the GML side of things...
  8. P

    Legacy GM Difficulties determining the nearest instance in 3D space

    I'm trying to create a script that returns the nearest instance in 3-dimensional space, by looping through all active instances of the object, evaluating the distance using the built-in function "point_distance_3d", sorting the ds_grid containing the data so that the smallest distance value is...
  9. camerakid

    GMS 2 Drawing game elements from a DS_GRID

    Hey Guys, I am migrating an isometric game from GMS 1.x to GMS 2 and I run into a complex question I should decide and I would like to hear a few ideas. In the old system I used a few ds_grids that were storing all graphics in it and a script was redrawing all elements with the tile_add...
  10. MagnumVulcanos

    GMS 2 Generating a line from A to B in a grid, with random variation

    Hello, I am trying to generate a path from a point in a grid to another, I am trying to do this in a 100x100 ds_grid in a way that the player won't be able to detecta s a stright line or perfect curve, to do this I need to "draw" a line from one center side of the map to another. This will be...
  11. M

    Ds_grid_get error

    I'm trying to draw a custom high scores table but any time the draw object runs I get the following error ___________________________________________ ############################################################################################ FATAL ERROR in action number 1 of Draw Event for...
  12. MirthCastle

    GMS 2 NEW 2.5D (Fake 3D) Depth Sorting - Grid Layers

    Hey ALL! I wanted to give a shout out to a new 2.5D sorting system I made I call Grid-Layers. :) Here is a Presentation File that says what it is: (This is in the video, but I wanted to provide it separate too) https://www.dropbox.com/s/jea942d31g6ta2q/GMS2_DepthSystem.pdf?dl=0 (don't use my...
  13. J

    DS_Grids Help

    Is it possible to get the sum of all the same items in an inventory using DS_Grid? I have 10 columns (10 slots). Row 1 hold the item indexes. Row 2 hold the stack amount. I know I can use for loop to loop through all my slots and add the stack amounts individually. But is there a function that...
  14. Pfap

    Ds_grid clarification

    Do ds_grids always take up the full room? If I have a ds_grid with 4 cells would those four cells be equally sized with pixels throughout the room? or are the cells always 32x32 pixels?
  15. W

    grids

    I'm trying to make a game with grid movement and grid based attacking but try as I may I can't seem to figure out even how to get the grid set right in the room. Can anyone direct me to or else provide a good simple for an idiot like me to follow tutorial on how to use ds_grid functions.
  16. trentallain

    Legacy GM Help with an inventory that can sort items

    I really have no idea where to start with the inventory in a game I am making. The issue I have is I can't find a suitable guide online for what I am looking for. I am thinking of using 2D arrays to achieve this, but as I said, I don't know what I need to do to achieve what I want. Here is a...
  17. Strobosaur

    Legacy GM World Generation - region connectivity: find closest free cell in ds_grid?

    For the last couple of weeks i have been spending all of my free time trying out different methods of randomly generating a level, and for my purposes i feel good ol' cellular automata is the way to go :) I've made a sequence of scripts to make it a bit more exciting than the classic 4/5 rule...
Top