ds_map

  1. G

    SOLVED Saving Ds_lists not working

    I've been having issues with creating a reliable save system for the current project I'm working on. I'm trying to save an array which holds all the players stats, like an rpg. I already have ds_lists set up but I've had this consistent problem: Once I have the game, storing all the values into...
  2. G

    Grid of Maps Question

    Hi All, I am working on a project that involves populating a ds_grid (jigsaw puzzle) with a number of maps (which contain info about the tabs and slots of the puzzle pieces). Ideally, the grid and map would be initialized, and then nested for loops iterate through the x and y coordinates...
  3. duran can

    GMS 2.3+ json to ds_map convert?

    Hello, im sending user list data from server buffer_write(buffer,buffer_string,json_encode(oyuncular_map)); // { "1": [ "duran", 0.000000, 0.000000, 0.000000 ] } like this to client how i can convert to ds_map ? this is not working //create event oyuncular=ds_map_create(); //sync event ...
  4. angelwire

    SOLVED Having to append " to an IP address to use in a ds_map [Solved - I was totally wrong]

    EDIT: I'll leave this up as an sad reminder of how dumb I look. I had accidentally swapped "!= undefined" and "== undefined" and so I thought it was returning "undefined" when it was actually returning the player and visa-versa. Everything in this post is wrong Using 2.3 I'm making a...
  5. G

    SOLVED Trouble Saving and Loading an Array using ds_map/list

    I'm just getting into understanding how to save and load my game and have had success with saving and loading single variables using the ds_map system, however I'm having many issues with doing the same with arrays. I've tried using ds_lists and searched around the internet for anyone else...
  6. Andymakeer

    SOLVED variable_global_set with decimals

    Hey guys! I have a ds_map that have pairs of var_name & var_value, that I send to a method that uses the function variable_global_set to add the value to that variable by its name. Its working fine, the problems is, seems like variable_global_set rounds the var_value value, so if I send like...
  7. K

    String and Ds_Map

    Okay, Basically, what I'm trying to do is the following: I want to create a string that uses a variable in it. The variable is stored inside a Ds_Map When I try to run the game this happens: ___________________________________________...
  8. Ekke

    GML Update multiple entries in ds_map

    I'm trying to update multiple entries in a ds_map, namely the value for AGE. The age is supposed to be added to a timer so it changes every time the timer fires. There will also be a "add baby" timer that will add more people to the list. I'm fairly new to GML and programming in general and I...
  9. If Programable_Matter

    Loading JSON info Error

    I keep getting this Error even though the program successfuly uploaded the JSON key :values Apparently the code works and the values show up in my program but like 2 seconds later I get this error. I'm pretty sure I'm missing some code Create Event http_get("http://webpage.json")...
  10. F

    Legacy GM ds_grid/map functions not working for HTML5 version?

    Hi there. I am using a ds_map in order to store a number of ds_grids. The idea is that groups of objects fill out their own shared grid as you collect them, and when you have collected every object within a group, it uses the grid to create a number of jigsaw pieces, then destroys the ds_grid...
  11. flyinian

    SOLVED increase the value of a ds_map

    How would I increase the value of a key in a ds_map? How would I increase this value in a step event? How about a key pressed event? ds_map_replace(enemyinfomap,"Count1", 1); Thank you.
  12. P

    Isometric grid with Tilemap got inaccurate

    Well, I don't think you got what I mean from the title so I will explain a little bit: I am trying to learn how to make isometric game, I used Shaun Spaldings tutorials and even added the object moving to grid working properly BUT my grid, made with tilemap works strangely because it marks the...
  13. If Programable_Matter

    Error when working with JSON

    I've been uploading json files unto a webserver and had no problem with them on game maker... for some reason I now keep getting this error with a new project I have started : json_decode argument 1 incorrect type (undefined) expecting a Number (YYGR) Create Event http_get("website.json")...
  14. M

    Destroy ds_grid / map / list, even if they are local?

    Hi There Just short question. It's not that clear in the GM Help. If i have a local ds_grid like this: var grid = ds_grid_create(...) Do I have to destroy it after use as well? Thanks a lot! kind regards mX273
  15. Sargonnas

    [SOLVED] Save and Load shinanigans

    Hello! I know I'm missing something totally obvious again, but this problem has been plaguing me for months and I keep going back to it and...no progress. I've gone through four or five different tutorials on Youtube, following them as closely as possible but haven't gotten any to work. I'm...
  16. sinigrimi

    GMS 2 How to call a random key from ds_map?

    How do I call a random key from a ds_map structure? or will i have to create ds_list? a bunch of variables are created in ds_list, if for example I have 300 keys? I tried to do something with this, but my head is not working as it should var arts = global.artefacts; var arts_size =...
  17. sinigrimi

    still have questions about ds_list(I'm sorry that there are a lot of questions, I'm really a noob)

    but I have very, very many lines with creating objects. how can I effectively add them to ds_list. or maybe there are other options? I have a script in which there is the following: in the controller the following: in the scripts are switch systems in which everything is indicated in a...
  18. DirtyLibrary

    GMS 2 Saving DS_LIST with nested DS_MAP?

    I'm relatively new to GMS2 and looking for advice on saving DS_LISTS that have ds_maps inside of them to an ini file. Adding the map to the list.. global.troops = ds_list_create(); entry = ds_map_create(); ds_map_add(entry, "type", "Knight"); ds_map_add(entry, "hp", 100)...
  19. Divinik

    GMS 2 Loading Grid From Json Not Working Properly?

    So in the game I'm currently working on, every companion and their info is stored in a ds_grid (Companions_Grid), and within each companion's column is another inventory grid stored for the companion. The code for storing the inventory grids into the json seems to be working perfectly, I check...
  20. chaslinux

    GML ds_map simple high score

    In the create event for obj_score I have the following code: #region set global variables for points, life, waves and sound effects global.points = 0; //score during game play global.life = 2; global.waves = 0; last_player = 0; // this is to handle the last player sound effect #endregion...
Top