Text scroll to bottom from bottom?

  • 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...

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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

  • 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.

  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)