How do I Make text box that the user can edit?

0 favourites
  • 9 posts
From the Asset Store
Change delay, create new lines, "backspace" the text
  • Hello, I have been through the site and plugins and I cannot find an answer to this:

    I have a box of text that is moving across my game. I enter the text in Construct2. I would like for the player to be able to click on the text box and to edit the words that are in the text box.

    I have tried two ways.

    I can use Text Box and have it move through bullet physics, and I can make it stop with the mouse click in the event sheet where I can end the Bullet physics, BUT I can not find a way that a user can edit the text.

    I have used the FormText box and I can give it physics as an object, but when I go into the Event sheet and try to make an action with the FormText box, stopping the bullet physics is not one of my choices.

    The movement of the text and the editing of the text are both of importance to my game idea.

    Thanks in advance for any feedback and direction on this issue. I really hope I look silly and that the answer is right under my nose!

  • Tinker around with it a bit, I think the standard textbox should be editable by the player, check the objects properties,

  • Hello ZakChaos,

    Thanks for the reply.

    I went back to "Tinker" some more, but did not find a clue. Not saying its not there, cause like you, I would think it would be there.....

    I think I attached a screen grab of object properties. What am I missing? or what property allows for users to edit this box?

    (Hey, if you "build games for food," would you figure this out for a pizza (maybe I order you one from your local pizza place - it could happen - like "paypal", but more like "pizzapal"....maybe a new form of currency...sorry for the ramble...)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I think you might be using a different object other than text box

    this is what the text box properties look like

    Good luck completing your project hope I could help

  • Thanks Brandon12hummer and ZakChaos!

    You guys were both right...... I knew I could get a user to edit the text box, but I had a bullet behavior assigned to it, and I was having a hard time enabling and disabling the bullet behavior. But now I can get it to stop, be edited and on a right click it starts moving again. Because when you right click on the box it wants to bring down a menu screen, you do have to be careful about where you right click to enable the bullet behavior....

    This had been challenging me for a couple of weeks....

  • Oooops,

    Well I was wrong. What happened was that:

    On the event sheet I did not set the mouse left click onto object....I set it simply on mouse click...then textbox bullet disable.

    So I thought it was stopping when I clicked on the text box. But when I added another text box they were both stopping just because I was clicking the left mouse button.

    So then I changed the event to "click on object:textbox" and it does not stop, it is as if it is unclickable....I think its clicks go to a edit function, but not to behavior change....

    Back to the drawing board....

    To refresh the need. I want to have a text moving on the screen using bullet behavior, and then when the text is clicked on, I would like for it to stop and be editable by the user....a right click and it moves again.

  • Anybody have an idea on this...just trying to get a moving text box that will stop for editing and then start moving again....or is this a sharks with laser beams type thing?

    Is it time for coding?

  • You can just place whatever they type into the box by updating the text as they type by using the append to add to whatever is already in the label box. That is what I did for my small creepypasta inspired game. The keyboard has an option of converting the keycode to the string it represents. Like this



    It suppose to be less than or equal to 122. Also if you click anywhere that isn't over the object it will start to move again and if they hit the return button makes it continue on.

  • Hello PhoenixNightly,

    Just wanted give you a quick thanks for your reply. I just got back to the computer and cannot wait to try this out!

    I will update accordingly,

    Thanks again,


Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)