• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

ds map

  1. Keys

    GML how to index JSON decode values properly

    Hi there, I need a hand taking in some JSON data, decoding it and extracting a couple pieces of information out of it. My JSON data looks like this: {"voted":[{"amendment":8,"reword":"A"},{"amendment":9,"reword":"B"}]} Now I've successfully indexed JSON data before using json_decode however...
  2. N

    SOLVED DS Map skips over saving an enum value

    So I've been trying to add branching dialogue to my game, and I've gotten everything to work except for one thing: A specific NPC dialogue state doesn't save! What I mean is that I want the NPC to say something else after being spoken to before to give the illusion that they remember what they...
  3. R

    SOLVED ds_map_clear() not destroying sub-maps added through ds_map_add_map()?

    I was working on save&load and used tons maps under a parent map to store entries like instances and DS etc. At first, these maps were destroyed one by one when loading is finished, and I saw in the manual that ds_map_add_map() tags these sub-maps automatically and when the parent is cleared or...
  4. M

    How do I save a ds list containing ds map?

    Hello everyone, so I'm implementing some kind of "inventory", so here is my initial code: for (i = 0;i < x;i++) { global.playerMap[i] = ds_map_create(); ds_map_add(global.playerMap[i], "name", "John"); ds_map_add(global.playerMap[i], "hp", "10"); } At first...
  5. sinigrimi

    GameMaker The script does not always work [SOLVED]

    Sorry to bother you again, but GML torments me. This time, the script does not always work for me, which should always work if I understand the mechanics correctly. I specifically shot a video (it is below), code is bellow too. Short description, when I go into the room, "Room" = false" is...
  6. 31Nf4ChZ4H73N

    GameMaker Why Does the first ds_map created have the index 2?

    I stumbled across this weird thing: I only have one object oData in the create event I create a ds_map nothing more map = ds_map_create(); now when I open the debuggin tool it tells me that there is one object oData which has a ds_map with the index 2 so when I restart the game by pressing...
  7. tibbycat

    GameMaker [SOLVED] Problem using ds map to save game.

    Hi, I'm still a newbie with programming but I'm trying to understand how to use data structures (ds maps specifically) to save where my player is in the platform game I'm making. I've been using @Pixelated_Pope's code from his DS Map Based Save System video which works perfectly for saving to...
  8. J

    GameMaker [SOLVED] Storing large amounts of data inside a script

    So I am creating a quest system. A quest can have a title, a questlog of the storyline and some commands like for example "Find the blue flower". My first Idea was to just create a DS-Grid, with all these Strings in it, which worked but then all this data, which has the potential to get very big...
  9. Y

    [SOLVED] Array inside DSMAP

    hi, i want to save arrays inside one dsmap but when i try this: dsJ = ds_map_create() dsJ[? "hi"] = array_create(9,noone) ds = dsJ[? "hi"] ds[0] = "name" ds = dsJ[? "hi"] show_debug_message(ds[0]) i just get a -4 instead of name
  10. D

    GML [SOLVED - Workaround] Savegame System has strange side effect on Event Listeners

    Hi, I implemented a Savegame System where I can configure for each object what kind of data I want to store without coding it for everyone... The code for the Saving and Loading is currently implemented like this: (still work in progress but works already in some cases) This system was...
  11. T

    Legacy GM Strange issue with ds_map and room IDs

    Dear fellow developers I've recently run into a rather strange issue with my current project. Some Info: I'm making a platforming game with a overworld for level selection. Now, I create a ds_map of the levels with the key being a number from 1 to the total number of levels, and the value...
  12. D

    Legacy GM For ... i cycle

    Hello everyone, this code work normally but I need help to minimize the code below with for .... i This is part of code ...Pls Help!!! //Level 1 if (room == otaq1) { ds_map_replace(data,"qifil0",2); ds_map_secure_save(data,"data.erk"); } //Level 2 if (room == otaq2) {...
  13. C

    Legacy GM A function for checking if a string contains (not =to) any ds_map key and finding value?

    I think the title should explain it well enough. I want to use this for creating a fighting game. At first i wanted to use the fighting game inputs tut by rm2kdev, but it only searches if the string is equal to a ds_map key to find the value. I'm thinking of using string_pos(function...
  14. N

    JSON reading. DS Maps etc.

    var wrjson = '{"status":"Success.","p1":"NoFontNL","s1":"26"}'; wrjsonlist = json_decode(wrjson); var worldrecord = ds_map_find_value(wrjsonlist,"s1"); draw_text_outline(x-240,y+52,string(worldrecord),4,c_black); It retuns undefined. It should return 26, see var wrjson line. Am I using the...
  15. B

    GML Save/Load System on Consoles - JSON vs DS Map System

    Hello, I am working on a project that may appear on consoles (XBox, PS4, and potential Nintendo Switch). I am looking into the various ways of saving/loading game data and came across tutorials using JSON and another tutorial that uses DS Map based save systems. I am wondering if consoles need...
  16. ZyKro

    GameMaker Need Help With Data Structures [SOLVED]

    I am trying to do a save system for a game I am working on and I'm not sure how to go about it. I heard data structures are very useful, but I am having trouble trying to make it work. I am using ds maps, but I don't know if it is the best way to go for me for what I am saving. I want to save...
  17. P

    Ds Map and Loot Tables help

    Hi! I've begun R&D on my second project using GML and want to create a complex loot system that randomly generates items based on the properties of the objects that will be dropping them. I've done about as much research as I can on DS Maps and DS List and still cant quite figure out how to...
  18. W

    Legacy GM How to save dead enemies? [DS MAP]

    Hey! I'm currently working on save and load but I've run into a problem... It saves the room and health etc. but not the enemies. So let's say you just cleared a level but stay in that room, then you quit and when you return there are all the enemies you just killed (What is happening). I want...
  19. RyanC

    Legacy GM Question about DS Maps

    Hi All, I'm currently implementing IAP's into my game and only require one consumable which is gems. At the moment I'm using ini files to store all the level data and gems collected but would like to at least make the gems more secure by storing them into a ds_map_file.json and secure saving...
  20. A

    GameMaker [Spine] IK x,y at mouse

    I couldn't figure out how to use a DS map to change the XY coordinate of a bone (specifically an IK handle) to match that of the mouse_x and mouse_y. I couldn't find it anywhere in the documentation either. I don't know anything about nor have I ever used a DS map. Sorry for my ignorance...
Top