• 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!

string

  1. N

    GMS 2 [Solved]Storing keyboard_string in two variables with different length

    I'm having trouble wrapping my brain around strings, and especially how string_delete works. I'm trying to store characters from keyboard_string in two different variables with different lenghts. One of the variables is used to store only 1 character (output), which refreshes everytime...
  2. Edwin

    Skipping tags in a string.

    Hello, nice people. I'm trying to create a script that will skip the tags like "[color=...]", "[/c]", "[alpha=...]" and stuff and then return a script_copy(). /// string_copy_tag(str,index,count) // Declare variables var str, index, count, p, cst, cct, ast, act, et, l, cstl, cctl, astl...
  3. V

    GML Convert precise number from string

    Is there any way to convert string like "‭0.01780942‬" to a number ? I used real() function but it automatically rounds to "0.02". code (file_read is a string): file_read = real(file_read); output: DECODE_fileRead: 0.02 (file_text_read_real() gives the same result)
  4. M

    GMS 2 [Solved] Issues with drawing Cyrillic text from a .ini file

    In my game I have setup a localization system using an included .ini file. The strings.ini file looks like this [english] 101=Resume 102=Settings 103=Quit 104=Video 105=Audio 106=Controls 107=Back 108=Resolution 109=Fullscreen mode 110=Master 111=SFX 112=Music 113=Walk left 114=Walk right...
  5. K

    GMS 2 the kill score doesn`t appear when i kill an enemy

    so i wanted to make a counter for the pointless murders i have commited in my game, and the text doesn`t show up, here`s the code in the create event: #macro resw 1024 #macro resh 768 display_set_gui_size(resw,resh); global.kills = 0; global.killsthisroom = 0; killtextscale = 1; and...
  6. 2

    GMS 2 Output Tilemap/Tile Layer Name String In Game

    How do you retrieve the name string you give tilemaps/tile layers in the room editor, and display it on the screen in game. I know we can reference them as strings and GMS 2 knows what we mean, but how do we get the program to output that name string without knowing what the tilemap/tile layer...
  7. 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...
  8. 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...
  9. 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...
  10. 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!".
  11. 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...
  12. 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...
  13. 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...
  14. 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] = ""...
  15. 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...
  16. 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...
  17. 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...
  18. 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...
  19. 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...
  20. 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...
Top