ds_grid

  1. J

    GML ds_grid_copy does not seem to do anything- what am I doing wrong?

    I'm sorry for all the ds_grid questions but everytime I try something they just don't for me. Im trying to duplicate ds_grid to another object, I previously used a for loop to copy manually. But seeing this ds_grid_copy in manual I thought it would be easier. But it doesnt seem to copy data...
  2. J

    GML ds_grid conventions

    when is it preferrable and why to use these items that seem to be the same thing: my_grid[#1,1]=string; ds_grid_add(my_grid,x,y,string); ds_grid_set(my_grid,x,y,string); same thing with reading string=my_grid[#1,1]; string=ds_grid_get(my_grid,x,y); thanks
  3. Flashpants

    Legacy GM [Unsolved] Drag and set an area on a grid

    Hi I'm having an issue designing a satisfactory system whereby a player can drag and define an area within a top-down style game. Within the game, the player can define what a room is used for in an translucent overlay that appears when the player is within "construction mode". The game is...
  4. J

    GameMaker ds_grid size (w,h) is that actually (r,c)?

    Also in the manual it says: ind=ds_grid_create(w,h) but it seems w seems to be the number of rows and h seems to be the number of columns when I try and use it. Am I misunderstanding? JB
  5. I

    Getting value from DS_GRID at mouse point

    I have spent a while trying to figure this out also have talked with people on the game maker discord and no solution. The issue I'm having is I can't return the x,y of the grid from the place I clicked with my mouse. I think you could do it with some complex math but I can't wrap my head around...
  6. R

    Using variables in ds_grid_get not working

    I really want lil Jimmy to be able to mod my game, but because he is 7 years old, I don't want to have him get messy with any heavy code. To do this, I'm making my "Dirt" object a child of a "Solid" object, where I store the actual code for working with the DS Grid. So, I create a variable...
  7. BerserkMecha

    GML Movement issues with DS Grids and MP Grids

    Hi, I'm making a movement system that uses DS Grids and MP Grids. This is for a turn-based strategy game that I have an idea for. The gist of this script is to move an object (called Character2) to a space withing a limited range around it. Unfortunately, I'm having issues. In the create...
  8. C

    How to update an iOS App keeping game datas?

    Hi guys, I'm programming a game with GM 1.4 and the iOS Export module. I will publish my game,for the first time, soon. In my game I save some informations about the player (last level, best score, etc.). My question is : what is the best way to save these informations (GML code) to work fine on...
  9. R

    GameMaker Grid Loop Help..

    Trying to get this code to loop through my inventory grid and check if the grid slot is "noone" and if it is "noone" add in an item and then stop. but it seems to add the item to every other grid slot. ie: 1,0 - 2,0 - 3,0 etc instead of just adding it to the first "noone" it comes across and...
  10. Cloaked Games

    Legacy GM [Solved] ds_grid Memory Usage

    I currently have an item index that is a ds_grid about 32 by 32 right now. Each row is an item, so it will get much longer in that direction over time. I was just wondering if I should have concerns about how large I make the grid. At what point will it start being an issue because of its size...
  11. NazGhuL

    Question - Code load_csv

    Hi. Any csv loading problem yet? I have an excel file: columns A to H (width 8) Rows 1 to 9 (Height 9) I included the file on the resource tree. then var tmp_grid = load_csv("sheet.csv"); var gw = ds_grid_width(tmp_grid); var gh = ds_grid_height(tmp_grid); show_message(gw)...
  12. J

    Grid problems that make no sense to me.

    I have a script that is run that keeps track of what entities are where in the room. The best way I can describe the problem is when I set things to the correct value they arent when I go back and check on them. I commented whats happening in the script below which describes it better than I am...
  13. T

    Referencing entries on a ds_grid after sorting it

    I was wondering, is there a way in which a ds_grid's entries can be referenced again after they are sorted? Let's say I have a specific row in a ds_grid. If I sort the grid, the old row might (or might not) be displaced to a different row number. Is there any way to get the row's new number...
  14. cdgamedev

    Legacy GM [FIXED] DS Grid Levels

    I just finished creating my level editor and want to know if there is any way that I could add the levels to my actual game, possibly using Included Files? I have tried but couldn't reference the files. They work by saving the contents of a DS grid Any ideas? Thanks, Callum
  15. T

    DS-Grid translation to screen

    All, trying my hand at procedural generation of some terrain for a game I'm working on. I am filling a ds_grid with the code number for solid earth and then running another routine to carve out caverns and tunnels. The routine that does the carving "overlays" a 5 x 5 cavern "array" of terrain...
  16. T

    [Solved] ds_grid_get error "ds_grid_get argument 1 incorrect type (2) expecting a Number (YYGI32)"

    Hey all, I created a ds_grid within the creation code of one of my rooms which looks like the following: global.grid_room0 = ds_grid_create(viewx, viewy); ds_grid_set_region(global.grid_room0, 0, 0, viewx-1, viewy-1, 0); Variables aside, the idea is to create a grid of a given size and set...
  17. O

    Legacy GM What makes ds_lists, ds_maps, and ds_grids different from an array?

    Hello, For someone who has adhd, and can't read long texts (like the manual), what's the difference in perks between ds_lists, ds_maps, ds_grids, and arrays? When would you use one over the other? Thanks in advance <3
  18. B

    Legacy GM convert ds_grid to mp_grid

    Hi there, I noticed there is a way to convert an mp_grid into a ds_grid by using mp_grid_to_ds_grid but is there a way to convert a ds_grid into an mp_grid?
  19. L

    Windows Menus

    Hello, I'm trying to make a Inventory menu system and right now I am a little stuck. I want when the player presses a key (lets say right) the cursor/menu-selector automatically highlights the next available spot in the inventory. [0] [full] [0] [full] [0] [0] [0] [0] [full] My theory on how I...
  20. L

    Legacy GM Ds_grids

    Hello friends (: back again to ask : How could I re-organize a DS_GRID so that basically all the values BUT those with 0 are Shifted. Basically imagine an inventory. If I drop something in slot 3.. [Lotion] [Tissue] [NOTHING] [Pineapple] How can the [Pineapple] shift over to the spot that...
Top