i would like some help with the "text" object

For questions about using Classic.

Post » Tue Feb 16, 2010 6:43 pm

hi everyone
i have run across a little problem but i cant find a solution so id like to ask for help here

my problem:
i have a text object in my scene with some text in it
there is also a edit box in the scene where players can type stuff in
i know how i can send the text from the edit box to the text object so that it replaces the old text
or how to use a event to change the text.
and that is the problem.
i dont want the text typed in the edit box to override the text in the text object but i want to Add it to the text object without overriding the old text so it gets below the already existing tekst
and i would like to edit multiple lines and i just cant figure out how.
i know you can do that if you double click the text object but you cant edit it like that in the event window.

here is a example:

text object = "hello everyone"
edit box object = "hello"

now i get
text object = "hello"

but i want
text object =
"hello everyone"
"hello"

im sorry if i am a little vague
my internship depends on it:P
if i get the internship i will be under a non disclosure contract so i cant talk about my project now

i hope someone can help me:)
B
3
G
4
Posts: 34
Reputation: 1,143

Post » Tue Feb 16, 2010 7:13 pm

Ampersand, concatenates the parts together.
More about that here
[url:2pkf227e]http://sourceforge.net/apps/mediawiki/construct/index.php?title=Expressions[/url:2pkf227e]
And
More on text here
[url:2pkf227e]http://sourceforge.net/apps/mediawiki/construct/index.php?title=System_Expressions[/url:2pkf227e]
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Tue Feb 16, 2010 9:25 pm

thank you very much!! :D
i have been trying things for over a day now!!
i came up with this idea to add lines to a text object:

[code:v9y4o77a]set text
textfile.Text & NewLine & "please wait a moment..."[/code:v9y4o77a]

textfile is the name of the text object
is this a correct method??

if someone has a better solution please tell me
oh and one other little thing: :roll:
can i make the background of the edit box transparant and change the text colour??
B
3
G
4
Posts: 34
Reputation: 1,143

Post » Tue Feb 16, 2010 9:46 pm

[quote="spearfire":w5umtw6p][code:w5umtw6p]set text
textfile.Text & NewLine & "please wait a moment..."[/code:w5umtw6p]

textfile is the name of the text object
is this a correct method??[/quote:w5umtw6p]

Yep.

[quote:w5umtw6p]can i make the background of the edit box transparant and change the text colour??[/quote:w5umtw6p]

Nope.

Just make your own custom edit box if you want to change the appearance of it:
viewtopic.php?f=16&t=5686&p=45360#p45360
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests