string

  1. Dagoba

    GML Sprite inside of a string?

    Hey, is there a possibility to have a sprite inside of a string message? I am creating a sign that guides the player and in the message it should display like: "Press X to Jump". The X would be replaced with a sprite of X, because the player could for example modify their keyboard settings and...
  2. RizbIT

    storing strings in ini with newlines

    [User] recordlogs=" 13/03/2021 - 565 13/03/2021 - 633 13/03/2021 - 574 13/03/2021 - 700 " You can write a string to ini that has \n new line escape character BUT When you try to read in the value of recordlogs you get a blank string as opposed to all the string
  3. zendraw

    GMS 2 String resourse

    Is there a way to store strings as a resourse in game maker so you can just pull them like you do with sprites? so how you have draw_sprite(spr_player); we culd have draw_text(txt_bio); usually how i do this is i have a script with a switch in it where i store the texts.
  4. Misael644

    SOLVED Any string function that works in a similar way to "string_format"?

    So, suppose I have a string of numbers whose value is "1234". I want only the first two digits, "12". Or another string whose value is 6. I want it to be 06. I thought about using the "string_format" function, but it's not exactly what I want. I want to use to make timers in the hh:mm:ss format...
  5. ChillAssLofi

    Deleting specific letters in a string.

    Hello. I have a question for you guys. I am currently making a game that's sort of like a word find. (You know the jumble of letters, and you try to find words hidden inside?) Well I have 99% of it done, but there's one very big problem with it. Let me explain the basic idea first. There's a...
  6. FoxyOfJungle

    GMS 2.3+ How to decompile a buffer? (It's possible??)

    When it comes to security issues, there are certain things that we need to know how to avoid or know if it is possible. There is a function called buffer_save(), however, is it possible to "decompile" this buffer saved in a text file?, somewhere else without using GMS 2 (the buffer_read()...
  7. samspade

    GMS 2.3+ Resource IDs are Numbers, Not Strings

    GM Version: GMS 2.2.5 and 2.3 Target Platform: All Download: NA Links: YouTube Video A Micro Tutorial for Someone New to Gamemaker and a Reference for the Rest of Us Resources ids are numbers not strings. Knowing this will help you prevent some bugs and allow you to do things like create...
  8. FoufaDjo

    SOLVED how to replace clipboard string special chr

    i want to cope and past only numbs and the chr "." for the ip string but idk a key word to target all special char i only fond string letters and digits that cover specific chr
  9. xDGameStudios

    GMS 2.3+ [DISCUSSION] Concat strings the easy way!

    Given the changes that were made to the GML parser, I would like to know what is your opinion on YYG allowing the use of something similar to what we can see in JS and C#. JS: var a = "foo"; var b = "bar"; var c = "damn"; var text = `Today I want ${a} with a ${b} and it was ${c} great`; C#...
  10. angelwire

    SOLVED Having to append " to an IP address to use in a ds_map [Solved - I was totally wrong]

    EDIT: I'll leave this up as an sad reminder of how dumb I look. I had accidentally swapped "!= undefined" and "== undefined" and so I thought it was returning "undefined" when it was actually returning the player and visa-versa. Everything in this post is wrong Using 2.3 I'm making a...
  11. E

    Remove line breaks from string

    Hello, how would you remove line breaks from a string? So that it goes from this: Hello World. to this: Hello World.
  12. R

    GMS 2.3+ Extension function not properly reading string return value from .dll

    Hi all. I'm having some trouble with a pathfinding extension I'm trying to write. The first real function of the extension that I'm trying to test out is the function to make the grid object for pathfinding, and I figured that I could cast a pointer to the object into a string and pass that back...
  13. K

    String and Ds_Map

    Okay, Basically, what I'm trying to do is the following: I want to create a string that uses a variable in it. The variable is stored inside a Ds_Map When I try to run the game this happens: ___________________________________________...
  14. V

    GML [1.4.999] Preventing # from going next line

    I am trying to prevent hash character from going next line. I have already tried string_pos(ord("#"), message), keyboard_check_pressed(ord("#")), and string_pos(ord("\n"), message), but apparently they do not work. How can I check if # key is pressed? Or is it not possible at all?
  15. GunnyBoy

    Converting string to object name to return object ID

    I have objects used for the player to collide into to change rooms called "o_transition". Each object has a unique with a naming convention (current_room_to_target_room) and has a a variable for the current room it's in and the target room to move to in the creation code. I'm trying to find a...
  16. GunnyBoy

    SOLVED Automatic player position after room transition help

    Most of the tutorials I've done involves creating a "door" object for the player to run into and have which room to change to as well as the x and y position to start the player in each of the door objects creation code. While this works I'm trying to think of a way to do this with JUST the door...
  17. Kyrieru

    GMS 2 Seperate numbers in a string into an array? (solved)

    I'm loading a text file with lines like; 1,5,12 And I need to convert it into an array. I understand (more or less) how I would have to do this, but frankly as more of an artist than a programmer; when I think about it my soul tries to leave my body. Because I know I will stumble over it...
  18. Daniel Mallett

    GMS 2 Drawing text frustrations

    I'm having a break from my main project to work on some form controls. I'm currently writing a text box control. I am perfectly happy with the code I have at the moment so I really don't want to completely restructure it in order to fix the following issue. The gap between each letter either...
  19. FoxyOfJungle

    GML Turn string into ******** password

    What is the most efficient way to turn a string into something unread for use in a password textbox? Example: Password: 12345678 Password in the draw_text(): ******** I tried to use string_format() and string_replace_all(), but I don't know if I did it wrong. Is using loops the only...
  20. Michael Hart

    SOLVED 3 or 4 strings to fit in specific area

    i have strings that should fit in an area from 210 to 786 . i would like to have 3 or 4 strings to scale to fit in this area. the variables are called guest1, guest2, guest3 and guest4 all of these variables vary in string_width how can i make these fit using draw_text_transformed?
Top