Text scroll to bottom from bottom?

Get help using Construct 2

Post » Tue Feb 11, 2014 12:07 pm

Look at this...
Tutorial Demo capx

The whole tutorial can be found in the tutorial section


But like I said if you using texbox then its with the y axis self.y - ???. Haven't figured that out myself.

But have a look at the example I posted. It is exactly what you want.


What games? Dice games / card games etc / space games / anything that wants a newest in oldest out.

But your way works too, seen it in mmo games etc. THey do same thing, just opposite direction.

3.player one .... etc
2.player one picked up a card
1.player one rolled a 6
0.start game


A better search word is "event log"DUTOIT2014-02-11 12:14:10
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,708

Post » Tue Feb 11, 2014 12:54 pm

Thanks a million guys, when I finally get home and have time to myself I'll work on this more. This isn't difficult at all, just when you aren't a programmer then these things don't make too much sense right off the bat. I'll likely be back in an hour or two lol.
B
25
S
6
G
6
Posts: 262
Reputation: 3,690

Post » Tue Feb 11, 2014 2:20 pm

[QUOTE=roracle]

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.[/QUOTE]

Not sure what you mean - all you should need to do is call the function with your required text.
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
33
G
47
Posts: 1,194
Reputation: 30,812

Post » Mon Feb 17, 2014 6:41 pm

RamPack:

What I was talking about is this:

If a function is running, and it calls to display the text in the function you gave me, and part of that function activates another piece of code that also outputs text, it treats it as the same exact command, and puts both text in the same box, so it's all garbled. If you would like, I can send you my CAPX file to take a closer look.

EDIT:

Here you go:

Scroll Text

I simply updated your example and put the "spacebar" to not just display text, but to call a function that also displays text.roracle2014-02-17 18:46:38
B
25
S
6
G
6
Posts: 262
Reputation: 3,690

Post » Wed Feb 19, 2014 4:15 am

Bump.

If anyone else wishes to take a look at my example bug duplication, feel free. I can't figure out how to fix it.

The last event is the function I added to duplicate the bug, and if you look at the spacebar pressed, it calls two functions: one to display random text, and one that shows the bug (which is displaying the different text in the same line)roracle2014-02-19 04:20:07
B
25
S
6
G
6
Posts: 262
Reputation: 3,690

Post » Wed Feb 19, 2014 9:25 pm

@roracle

Sorry - I missed your post, if you put @username into the post then that user gets a message to look (so @rampackwobble gives me a message next time I log into the site that there is a post for me)

The function creates a spritefont object at x,y and then scrolls this object up. You are calling the function twice in one tick so it is creating two spritefont objects at the same time in the same place and then scrolls them both up together - notice how they both scroll twice the distance ?

How to fix this ? I guess you could put some check into the function that says Am I already running ? if so pause until I've finished running. Or before calling the function put a wait 0. I will give it another look when I get time.

In your version (with the double function call) putting a wait (0) befor the second call does appear to fix it...
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,812

Post » Wed Feb 19, 2014 9:31 pm

RamPackWobble wrote:@roracle
In your version (with the double function call) putting a wait (0) befor the second call does appear to fix it...


See, this is an RPG, and a lot of text will be displayed. I tried it already and it just made it cause the error in a _different_ call for text. lol
B
25
S
6
G
6
Posts: 262
Reputation: 3,690

Post » Wed Feb 19, 2014 10:21 pm

Fair enough - I did not foresee you calling the function so quickly.

By altering the scroll rate I have had this working at 20+ calls per second (https://dl.dropboxusercontent.com/u/143636437/examples%20for%20web/scroll%2020%20calls%20per%20%20second/index.html)

but anything above 2 calls a second would possibly be too fast to read whilst playing ?(https://dl.dropboxusercontent.com/u/143636437/examples%20for%20web/scroll%20half%20second%20example/index.html)

anyway good luck with finding a solution.
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,812

Post » Thu Feb 20, 2014 12:13 am

Yeah, I'm still not sure how to accomplish this. The issue is still there even with faster text because like the problem has been, it's calling two lines of text to display at once. The problem with mine is it calls text saying you hit or miss, then it calculates damage and tells you how much you do in damage, and it tells if your skill has raises by a whole point when it happens. It runs one function to do the hit/miss, then when complete it calls for damage which displays text. They are two functions called two separate times. The thing is, "leveling" is called from the "damage" function. So if you do damage, you gain skill and if that skill is greater than x.0 it tells you "your skill in bla has gone up, it is now X" (x being the new skill level).

I thought since they were separate functions, they would act as such, but as you said they call them all at once. If you wait(0) it just delays it for the NEXT message instead, and making them all wait(0) causes it to just catch up with itself.

For a game development software, it's baffling why they offer text output in a "word" style design instead of a built in plugin for general text output like most games have. The sprite font is cool, but a fully integrated gamer style text box would be so relieving.
B
25
S
6
G
6
Posts: 262
Reputation: 3,690

Post » Thu Feb 20, 2014 10:51 am

B
64
S
33
G
47
Posts: 1,194
Reputation: 30,812

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: camtray, Lancifer, marcoscodas and 10 guests