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

Get help using Construct 2

Post » Thu Mar 05, 2015 8:08 pm

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!
B
4
Posts: 8
Reputation: 216

Post » Thu Mar 05, 2015 8:13 pm

Tinker around with it a bit, I think the standard textbox should be editable by the player, check the objects properties,
B
7
S
2
G
3
Posts: 55
Reputation: 2,713

Post » Tue Mar 10, 2015 12:48 pm

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...)
You do not have the required permissions to view the files attached to this post.
B
4
Posts: 8
Reputation: 216

Post » Tue Mar 10, 2015 6:17 pm

I think you might be using a different object other than text box

Image

this is what the text box properties look like

Image

Good luck completing your project hope I could help
B
12
S
8
G
3
Posts: 33
Reputation: 3,483

Post » Tue Mar 10, 2015 8:25 pm

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....
B
4
Posts: 8
Reputation: 216

Post » Tue Mar 10, 2015 11:08 pm

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.
You do not have the required permissions to view the files attached to this post.
B
4
Posts: 8
Reputation: 216

Post » Fri Mar 13, 2015 6:21 pm

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?
B
4
Posts: 8
Reputation: 216

Post » Fri Mar 13, 2015 8:12 pm

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

MoveEdit5.png


**FIX**
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.
You do not have the required permissions to view the files attached to this post.
B
22
S
4
G
2
Posts: 362
Reputation: 2,355

Post » Sun Mar 15, 2015 2:56 pm

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,
PlanB
B
4
Posts: 8
Reputation: 216


Return to How do I....?

Who is online

Users browsing this forum: DjPoke, dreaa, Lightside and 15 guests