Text scroll to bottom from bottom?

Get help using Construct 2

Post » Tue Feb 11, 2014 6:22 am

I am making an RPG system similar to Elder Scrolls and Ultima, but I like the way UO always put information in a little text box so you can see what's been happening, re-read messages, see combat output, etc.

I understand how to make the Text object put new text in, but in order for it to input at the bottom, the keep focus on the bottom line, and keep scrolling up when you gain a skill etc, it requires a Java call from the browser object and requires the TextBox object. I don't like TextBox because I can't customize it with a transparent background or my own fonts etc.

Again I've seen a few examples, but nothing I am really looking for.

The best part about this is that it will ONLY output info, and you never input anything into the text area. This should make it easier to code for sure. If anyone has any info on this, please let me know.

Yes, I've checked the forums already and found many examples that are good but not for what I'm doing.

How it should work: Acrobatics has increased a point, and the text object should display "Acrobatics has gone up! It is now 2!" Then when sneak goes up, it should keep the previous text, and on a new line say "Sneak has gone up! It is now 13!" And so on, and so forth.
B
27
S
7
G
6
Posts: 268
Reputation: 3,852

Post » Tue Feb 11, 2014 8:30 am

How about something like this ?
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,892

Post » Tue Feb 11, 2014 9:31 am

Yes it works well. However, I am having trouble implementing it in my project. It keeps updating the previous text instead of applying it to the new creation. I'll message you with a link to my capx.
B
27
S
7
G
6
Posts: 268
Reputation: 3,852

Post » Tue Feb 11, 2014 9:41 am

@roracle
When you add text... do it like this..

Newtext&newline&Textbox.Text
ExampleDUTOIT2014-02-11 10:09:30
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,728

Post » Tue Feb 11, 2014 10:33 am

That method doesn't work too well. I need it to come from the bottom and push the other text upward. I'm surprised this isn't easier to do since it's such a big deal in...almost every game I've ever played. You'd think, at least with Construct 2, that someone would have made an easy plugin for something like this already.
B
27
S
7
G
6
Posts: 268
Reputation: 3,852

Post » Tue Feb 11, 2014 10:38 am

Ok version 2 put into a function.

Slight variation: I have set two fades - one kicks in when 5 or more texts are displayed (to fade out the earlier text so too many texts are not displayed) and a second that kicks in after 30 seconds to just remove old text after it has been displayed for long enough.

RamPackWobble2014-02-11 10:41:39
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,892

Post » Tue Feb 11, 2014 10:47 am

Plugin

or

you can use the append text, that inserts text to bottom, and all you need to do is scroll view to last line. There is an example somewhere in forums on how to do this with x/y axis and text box if I recall correctly.


Sidenote;
Most games I play have newest entry at the top and ability to scroll down all past game events.DUTOIT2014-02-11 10:51:18
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,728

Post » Tue Feb 11, 2014 11:05 am

DUTOIT I have already seen that example and isn't what I need. TextBox was the thing I mentioned in my original post that I did not want to use because it's not customizable. You can't change the box to transparent, etc.

RamPackWobble:

Your example still works well, but It is still doing this thing where it only updates the _original_ SpriteText object, as if it's creating the new ones, pushing the old one up, but only changing the old one, and not putting text in the new one.
B
27
S
7
G
6
Posts: 268
Reputation: 3,852

Post » Tue Feb 11, 2014 11:40 am

[QUOTE=roracle] You can't change the box to transparent, etc.

[/QUOTE]

Yes you can :)
Set css
"background" "transparent"
"Border" "0"
DUTOIT2014-02-11 12:05:47
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,728

Post » Tue Feb 11, 2014 12:05 pm

Okay this is what I was looking for lol. Didn't realize the TextBox could do that.

My only problem is getting it to display from the bottom instead of from the top.

Also, what games do you play where the new text is at the top and old is at the bottom? I play MMOs and Single player games quite a bit and the only time I've seen it top to bottom is with a note or text, not with system messages or chatting (no chat in mine, but same concept as a system/chat box).
B
27
S
7
G
6
Posts: 268
Reputation: 3,852

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests