1. FoxyOfJungle

    SOLVED Unable to get object for index 100001 ???

    Hi! It's the first time I've seen this error specifically. I'm starting to think it's a bug (or I don't understand this behavior), but I'll try to explain: #1 - I have this code in a script file (GML): Code 1: enum ENUM { ITEM1, ITEM2 } function ftr_setup() { global.list_of_itens...
  2. isaacyoshimario

    GMS 2.3+ Timeline index out of order

    I'm trying to make a tower defense game, and everything seems correct, but the waves go in the order 4-1-2-3 for some reason. Waves folder: Create event: image_speed = 0; global.wave = 0; running = false; canclick = true; Step event: if timeline_position > timeline_max_moment(timeline_index)...
  3. flyinian

    SOLVED Parent and first child have same index/id?

    I am having trouble updating data when switching what is being selected(think of items in a store and when you click different items, it gives different data for each item). This is determined by the object's index/id when clicked. I noticed that the parent and first child of said parent has the...
  4. tobiasgjerstrup

    GMS 2 [Solved] how to change image_index for a drawn sprite?

    hello guys. I was wondering how you change the image index for a sprite that you draw (not the sprite associated with the object)
  5. Smenkare

    (solved)getting index from ds_list

    Create event exampleList = ds_list_create(); ds_list_add(exampleList,1); ds_list_add(exampleList,10); ds_list_add(exampleList,10); ds_list_add(exampleList,30); choice = 0; weight_sum = 0; for(var i=0; i<ds_list_size(exampleList);i++) {weight_sum += exampleList[|i]} Draw event if...
  6. J

    Question - Code Need help with random cursor

    Hey guys, So I have a sprite with 10 images, all different coloured cursors. Here is my code: if (room != rMenu) and (room != rControls) and (room != rUpdatesAndNotes) and (room != rShop) and (room != rEnding) and (room != rCredits) { cursor_sprite = sCursorGun; } else { cursor_sprite =...
  7. Pfap

    [SOLVED]Resource order and saving

    This is probably not a big deal, but is there a solution to avoiding resource conflicts when updating a launched game other than: once a game has been released never change the order of resources and if adding to the game only add at the tail of the tree? I guess, maybe saving the string name...
  8. FacesOfMu

    GMS 2 Get the script name within the script?

    I see there's script_get_name(scr), but that requires the input of the script index. Is there anyway to get the name of the script the code is in without knowing the index? For example, objects have the "self" and "id" keywords to reference themselves. I'm looking for a programmatic way to...
  9. S

    GMS 2 (Help) Array index out of range

    I was making a scrolling system in gamemaker 2 and I got an error I cannot seem to figure out! Create: Draw: Step: Error:
  10. H

    (Solved) Deleting/destroying room duplicates?

    Hello! I am using DND, but understand a bit a coding/gamemaker language. I am making a game similar to Doodle jump. As the player sprite leaves the top of any room it moves to the next room and if it hits the bottom of any room it goes to the previous room - simulating an endless sky. I...
  11. FacesOfMu

    How do you solve "index out of bounds" errors?

    Do you have a special method or tip on how to solve "index out of bounds" errors? Do you know a neat trick on cutting your investigation time? Please post your GMS2 list and grid access tricks! Pre-reading...
  12. S

    Legacy GM DS_grids - non reproducible bug

    I have been getting this bug with my DS_grids that seems random when it shouldn't be and I highly suspect it is a bug on game maker's side. at the start of the game I have this object creating global ds_grid's in Game start event global.invT = ds_grid_create(0,3) //item id, modifier, upgrades...
  13. A

    Windows sprite_index not working properly

    So i just bought gms2 and started a new project. as i started inserting animations i noticed something. Unlike in gm1 if i set sprite_index = 0 it just locks on set index now here is my draw event: draw_self(); show_debug_message("image_index = "+ string(image_index)); if hsp_ == 0 { if...
  14. YoSniper

    [SOLVED] 1D/2D array confusion

    Hello community, I recently ran into an issue using arrays that I don't remember experiencing in Game Maker 8. Basically, I am trying to initialize values to be stored in a persistent object that basically tracks my game data, and is responsible for saving to files and loading data back from...
  15. andev

    GML String functions that start at 0 instead of 1

    GM Version: Studio Target Platform: All Download: Download Links: <N/A> It bothers me that the string functions start at id 1 and not 0, because it means you have to add offsets sometimes. So I wrote some pass-through scripts that fix it. Further reading. All scripts are ready to drag straight...
  16. Pfap

    global variable index???

    FATAL ERROR in action number 1 of Create Event for object data_structure_grid: global variable name 'purple1' index (100007) not set before reading it. at gml_Object_data_structure_grid_Create_0 (line 14) - global.purple1 = 1 This is the actual code: //variables for tracking global.red1 = 1...
  17. K


    Hello Friends,Let's Contextualize... I'm doing a phase selection map where you plot the route to it, it works like this: you're on a planet and now you want to go to another, you plot a route to the other planet, creating points, obeying the amount of fuel that you have. Then you play the...
  18. Y

    Legacy GM Cannot make sprite animation stop

    Hi, i'm having this issue without a clue on how to solve it. In my character selection room y have an object which will set the frame (sub-image) of the player and CPU, and also the preview. for this In my object (arrows) I'm using "image_index -= 1 (for the back) and image_index += 1 (for the...
  19. A

    drawing animation issue

    Hey boys and girls, how are you all doing?Hope well! I have got this problem that i've seen solved in some threads but i couldnt really solve myselfe (probably just because im bad at programming ahah) first and foremost here is my lil' bit o' code if (atk1 == true) { sprite_index =...
  20. S

    Legacy GM Check if room exists by name instead of by index

    I've made an elaborate system of room generation but it works by checking the room name instead of room index. It's not working because room_exists checks for the index. How do I make it check for the name instead?