• Hey! Guest! The 36th GMC Jam will take place between February 27th, 12:00 UTC - March 2nd, 12:00 UTC. Why not join in! Click here to find out more!

string

  1. Edwin

    Legacy GM Can you help with skipping string_insert()?

    I need to use string_insert() function with specific variable that keeps the position of where I need to insert my string with string_insert(). The string what I'm gonna insert is an alpha tag. Other script will delete this tag and make the text transparent from position keeping variable to end...
  2. Pafbar

    How to set sprite_index to a string?

    Hello! (scroll down to see the crux of the issue) I'm making a game with RPG-style dialogue, where the different characters you talk to have different poses when they talk to you based on their emotion. The system has global variables that determine which characters are on the left and right...
  3. DanjelRicci

    HTML5 Readable meta comments and strings in .js file

    I just realized the 'gamename.js' file exported with the HTML5 build doesn't strip out meta comments (like ///@description, ///@param, etc) and it doesn't obfuscate strings in general, leaving a lot of readable content like resource names, logs, translations, urls, and other potential sensible...
  4. Edwin

    GML How to cut specific string from a text?

    Hello, people. Can you please tell me the way how to cut off a specific string from a text? For example to cut "World" from "Hello, World!".
  5. Kiwi

    GMS 2 Special characters in a string?

    I'm fairly new to GML, so this question may sound a little nooby. It's also my first post! :) So I've made a typer object which types out a string, letter by letter, which works fine. I've also made it so that when it detects a certain character, it does some kind of action. Like pausing or...
  6. Braisque

    GML A baguette problem: special characters and non-breaking spaces (SOLVED)

    There seems to be little to no documentation about this subject: in some European languages, there's something called "non breaking space" (dec = 160, uni = U+00A0). At some point in a phrase, there are spaces that shouldn't allow what's after to be on the next line. Unfortunatly, GameMaker...
  7. C

    Including hex characters in strings

    Greetings! I was reading the section of the GameMaker Studio 2 manual about strings, and from the looks of it you can include hex characters in strings with something like this: text = "Testing, Testing \x0A 123" but when I try that, the string is just set to "Testing, Testing " and ignores...
  8. Kyrieru

    GMS 2 Getting Japanese text from a a txt file.

    Following some advice I was able to read from a .txt file and get a dialogue system working with english. if file_exists(path+file) { read = file_text_open_read(path+file); var num = 0; while (!file_text_eof(read)) { str[num++] = file_text_read_string(read); message[num] = ""...
  9. E

    Legacy GM [SOLVED]Selfmade "Font" is too inefficient

    Here's my problem: I created my own font in MS Paint., and want to implement it in my project. Gamemakers font options are quite confusing for me, so i looked for the easy way out (I thought) and wrote a few lines of code to iterate through the text, determine the letter and whether it's...
  10. KorbohneD

    Referencing to Enums

    Quick Question Guys. In my current project I have written a text file translator that turns text file code into real code. Now the problem is, in the program, I have a bunch of enums, one in particular describing material. And of course I want to tell the textfile, which material it should...
  11. XirmiX

    GML [SOLVED] Convert string to keyboard input or return keyboard input?

    Is it possible to convert a string to a keyboard input? Say I have "mouse_x" string variable and I want to create a new variable that holds keyboard input and takes that string variable to get what key the variable will be set to? Or may be it's possible to set in a list a key value? I've tried...
  12. Edwin

    GML string_copy_ext

    Hello, fellas. I have a question. So, if there is function string_copy then where is string_copy_ext? I can't make a string appearance with draw_string_ext because string_copy doesn't see the width of string where it have to make line break, so it just adding a value to count and makes a line...
  13. Taddio

    Input a string with gamepad

    Hey guys, I'm looking for some pointers on how to input a string from a gamepad, like "enter your name", and such stuff. From my understanding, I can't use the virtual keyboard if it's not on a mobile platform, right? Should I have a sprite of a keyboard + a moving object that mimics button...
  14. M

    Windows Illegal character in path?

    Hi I got GMS2 before but this time its on another computer and I'm running into a problem, during the Installation of Runtime during the start-up of GM about midway of the install its returning with Illegal characters in path. System.ArgumentException: Illegal characters in path. Done a couple...
  15. 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...
  16. 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...
  17. 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...
  18. 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...
  19. 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...
  20. 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 =...
Top