Simple Chat Window With Rex's Plugin

Get help using Construct 2

Post » Tue May 15, 2012 9:24 pm

Hey, kinda a big deal

Once the Textbox is Filled up OR the message was longer then the Box..

It can simply no longer be seen

How can I fix this?


A.   It should not be like Notepad, and continue the line far to long; but instead jump to the next line if it has reached the End.

B. A sort of Scrolling OR (worse) resetting the Text Box once it has reached the Bottom.

Hiiiilfe
B
40
S
11
G
4
Posts: 665
Reputation: 8,403

Post » Tue May 15, 2012 9:28 pm

http://dl.dropbox.com/u/53738503/chat.capx
B
40
S
11
G
4
Posts: 665
Reputation: 8,403

Post » Tue May 15, 2012 9:55 pm

For a scroll-able chat output box, I would use an array to maintain the chat history. Every time a chat line is sent, it is added as a new row in the array. Then, the text box would be updated using variables, i.e. FirstRow and LastRow. On every update, you would clear the text box and display the rows specified by the variables.

That way you can also have your scroll controls just change the variables, since you are displaying the rows based on the variables. This would allow for other controls to manage the history, or allow for saving the history.

This is the way I would try to do it, but there are probably better ways.

I hope that helps!Wastrel2012-05-15 21:57:22
Don't see the fnords and they won't eat you!
B
75
S
16
G
12
Posts: 322
Reputation: 11,608

Post » Tue May 15, 2012 10:15 pm

I haven't used Arrays in Construct2 before.

It sounds fairly simple, but I have no idea how to set it up

I would like some sort of example if you don't mind :) (Does not have to be a Capx, just some txt lines perhaps)


If this works, GREAT!, but then I still have to worry about the "Length" of the Chat Box, since that can't be helped with "line"..

B
40
S
11
G
4
Posts: 665
Reputation: 8,403

Post » Tue May 15, 2012 10:16 pm

Some sort of    "only10letters" & newline

heh
B
40
S
11
G
4
Posts: 665
Reputation: 8,403

Post » Tue May 15, 2012 11:28 pm

I will work on an example tonight, but I may not be able to have it ready until tomorrow.

Line length shouldn't be an issue.Wastrel2012-05-15 23:30:02
Don't see the fnords and they won't eat you!
B
75
S
16
G
12
Posts: 322
Reputation: 11,608

Post » Wed May 16, 2012 8:42 am

Ty :D

I am currently on a farm in Wales :p So I don't have time to code before tomorrow night anyway
B
40
S
11
G
4
Posts: 665
Reputation: 8,403

Post » Wed May 16, 2012 9:58 pm

Here is an example of what I was talking about. I didn't have time to put in scrolling, but I can probably get that done by tomorrow.

http://dl.dropbox.com/u/38038537/examples/Chat_Example_NoScroll.capx

Have fun!
Don't see the fnords and they won't eat you!
B
75
S
16
G
12
Posts: 322
Reputation: 11,608

Post » Thu May 17, 2012 8:06 am

it is great :D tyvm !
B
40
S
11
G
4
Posts: 665
Reputation: 8,403

Post » Thu May 17, 2012 1:17 pm

http://dl.dropbox.com/u/53738503/ChatHaxx2.capx

You rule ^^

I am asking Rex right now if this is Online or not hehe^^
B
40
S
11
G
4
Posts: 665
Reputation: 8,403

Next

Return to How do I....?

Who is online

Users browsing this forum: DemantDigitalArt, farfetchd83, mjj1990 and 5 guests