1. Hello Guest! It's with a heavy heart that we must announce the removal of the Legacy GMC Archive. If you wish to save anything from it, now's the time! Please see this topic for more information.
    Dismiss Notice

Editable Text

Discussion in 'Programming' started by littlehazel22090, Nov 20, 2018.

  1. littlehazel22090

    littlehazel22090 Member

    Joined:
    Nov 20, 2018
    Posts:
    2
    I'm trying to figure out how to create text that the player can edit. I've only found ones for regular coding but I'm using drag and drop.
     
  2. CreatorAtNight

    CreatorAtNight Member

    Joined:
    Jun 23, 2018
    Posts:
    121
    Normally you use a variable to which you keep adding keystrokes. I'm not sure if you could do that by only using drag and drop elements. May I ask why you want to stick to just drag and drop?
     
  3. littlehazel22090

    littlehazel22090 Member

    Joined:
    Nov 20, 2018
    Posts:
    2
    Im new to coding in general and I wanted to stick to drag and drop, since this is my first little project. It's not anything major but I'm trying things out. I do want to learn how to do regular coding though.
     
  4. CreatorAtNight

    CreatorAtNight Member

    Joined:
    Jun 23, 2018
    Posts:
    121
    Ok, yeah I see, always good to start slowly. Giving the player the option to input text is a bit more complex than you would think as GameMaker doesn't have any options for that other than just checking on single keystrokes. I never work with drag and drop, I will have a quick look at what's possible.

    EDIT: hm, I don't really see an easy solution for that with drag and drop, maybe I'm just not seeing it but it seems easier with code. You might want to just give the player some options to choose between if that's possible.
     
    Last edited: Nov 21, 2018
  5. TheouAegis

    TheouAegis Member

    Joined:
    Jul 3, 2016
    Posts:
    7,143
    You can do a lot of things with just DnD, but by the time you figure out how to do all them, you may as well just use GML in the Code action. lol
     
  6. dannyjenn

    dannyjenn Member

    Joined:
    Jul 29, 2017
    Posts:
    572
    If you want something like a text field, it can be pretty complicated.

    If you just want a pop-up window where the player can enter some text, there might be a Drag and Drop which can do that. I'm not sure. There used to be one, called "Show Message", which was the equivalent of show_message(). But they got rid of show_message() for compatibility reasons and replaced it with some new function show_message_async() which I never figured out how to use. I'm not sure whether there's a Drag and Drop for show_message_async() or not, but you could try looking for it.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice