• Hey! Guest! The 37th GMC Jam will take place between May 28th, 12:00 UTC and June 1st, 12:00 UTC. Why not join in! Click here to find out more!


  1. A

    GMS 2 [SOLVED] Letter-by-letter text sound not playing?

    Heyo! Okay, so in my game, I have set up some code so that a string of text appears letter by letter, just like I'm typing this right now. Now, I tried to write some code so whenever it would detect a space in the string it would not play the sound associated with the letters being drawn. The...
  2. zendraw

    GML Storing multiple values into one (great for RPG`s)

    So recently i wanted to know how long a number can game maker have and people gave me various answers @Bingdom https://forum.yoyogames.com/index.php?threads/biggest-number.43446/#post-267419 @TsukaYuriko -3.4E+38 to +3.4E+38 or -1.7E+308 to +1.7E+308, depending on whether a 32-bit or 64-bit...
  3. T

    Windows Runtime loop ERROR

    GMS:2 used to work perfectly fine up until I switched my internet plan for the same ISP. Now the runtime installation just loops whenever I start the program. I even get this error: I've looked everywhere for a solution, but I couldn't find any online other than "Change your ISP." I have...
  4. Nabil Kabour

    Adding newline character to string after a specified amount of characters

    Hi, I am trying to make a script which inputs a string and returns that string with newline characters every n amount of characters. However I do not want a newline character to be added in the middle of a word or number, and I do not want a newline character to be added after or before another...
  5. C

    Legacy GM [SOLVED] Searching strings within strings using GML

    I made a string system for a fighting game where every action adds a string to the variable input_chain, and there is a variable input_chain_len=string_length(input_chain)+1, I also have a technique_chain variable which =" ", it changes if I do an action or technique, I have been able to make...
  6. N

    Legacy GM JSON reading from URL.

    Hi. var wrjson = '{"status":"Success.","p1":"NoFontNL","s1":"26"}'; wrjsonlist = json_decode(wrjson); var worldrecord = wrjsonlist[? "s1"]; var wrowner = wrjsonlist[? "p1"]; draw_text_outline(x-240,y+52,string(worldrecord) + " by " + string(wrowner),4,c_black); works, but var wrjson =...
  7. FactorX12

    Something's not right with this

    Ok, so I am trying to make a platformer and I need to be able to switch between specified rooms that are set up like this: r1_1 the first number being current level, the second number being which room of the current level player is in. I tried doing this: room_goto(r1_1); which worked fine. so...

    GMS 2 Writing strings in-game

    In my game, I want to be able to write strings via keyboard input in-game. I tried to do this. In the object that is the textbox, I have 3 events: -Left Pressed event: global.textselect = id; -Step event if (global.textselect != id) || (string_length(global.title) > 14) exit; if...
  9. P

    real("2+a") variable in string in real

    is something like this possible a = 5; str = "2*a" b = real(str) show_message(string(b))
  10. A

    Legacy GM Problem saving time based score

    Hello everyone, I am trying to save a time score like this "0:00:00". I already used ini files and functions ini_write_string and ini_read_string (you can enter and save your name the first time you play and it works fine. Now i'm using the same code but doesn´t work. 1st object: SCORE_LOAD...
  11. S

    GMS 2 Get a string out of enum

    Not sure if this is possible or not but I have an enum and i want a variable to change to a random string from that list. For example if i have this enum. enum item { none = 0, test1 = 1, test2 = 2, test3 = 3, height = 11, } and i want a variable to change to...
  12. darijs1

    Legacy GM (Solved) Simple way to draw a rectangle under my text

    Based on this code: ///Script object = argument0 str = argument1 draw_set_halign(fa_center); draw_text_transformed(argument0.x, argument0.y-argument0.sprite_height, str,0.5,0.5,0); how can i draw a rectangle under this text in a way that would keep the rectangle the same width and height as the...
  13. Gasil

    (SOLVED) Special characters á, é, í, ó, ú and ñ on strings.

    Hello again, I'm seeking a bit of advice about this matter, could you help me please? I was planning on using both English and Spanish languages on my games, however, it seems GM2 doesn't recognize special characters such as the extra Ñ letter and the vowels marked with an accent. While I'm...
  14. S

    GMS 2 [SOLVED] Adding the results of a For loop together

    I have the following code. Just for reference, ds_grid_get(playerInventory, 65, i) is the status of the object, and ds_grid_get(playerInventory, 0, i) is the name of the object. for (i = 0; i < ds_grid_get_height(playerInventory); i++) { if ds_grid_get(playerInventory, 65, i) == "Equipped" {...
  15. J

    Need some string help

    good evening everyone, i am working on a personal project, a unique calculator for a gaming work place that is needed and i was told to help with it (Game maker is amazing) lol the software is completed, however there is just this ONE thing I don't like. the strings come out as 123456789 when...
  16. S

    GMS 2 [SOLVED] How to Detect the Amount of Lines in a String

    I'm using the function: "draw_text_ext_transformed" Its odd, some things behave differently than I expected, but overall I get it. However, I need to detect how many lines are drawn with randomly sized strings of different words. With the "width" argument in this function, you can specify how...
  17. Silversea

    Legacy GM "string_width" calculating wrong value?

    Perhaps someone with more experience could explain what is happening here, and how to correct it. I'm assuming it has something to do with spacing of the characters in the font not matching with the actual draw length. The actual draw width of this text is 153 pixels, but the game says it is...
  18. K

    "filename_change_ext()" only returns <null>

    I'm testing in the debug console, and no matter what kind of arguments I use, this function never returns anything but "<null>". Example: filename_change_ext("test.txt","") returns "<null>" filename_change_ext("test.txt",".jpg") returns "<null>" etc.... Is this a bug with GM:S or something, or...
  19. CedSharp

    GML [SOLVED]: Parsing Strings ignoring substring

    So I don't want to create a book out of my problem, here it is: I have a string, say 'Hello [c:yello]friend[c:default]! How are you?'. That string has tags (starts with [ and ends with ]) inside of it for colors. Now, I'm trying to make a draw_text_ext that ignores said tags, but manually...
  20. H

    Legacy GM Translating key value to string

    Hello! I am trying to translate a pressed key value (say, '72' which is the value for the 'H' key) to a string, but I can't get it to work. Any ideas?