Scoreboard that scrolls the score up.

P373GamesP373Games Member Posts: 17
edited January 2012 in Working with GS (Mac)
Hey everyone,

I have searched for a while on this but I cannot figure out how to go about making a scoreboard that scrolls the score up similar to the temple run scoreboard. Currently I have a scoreboard that changes the score correctly but it would look a lot nicer if I had the numbers scroll up.

Thanks in advance :)

Comments

  • App SurgeApp Surge Member Posts: 651
    Use the interpolate attribute. Or say something along the lines of "every 0.1 seconds change score to score+1
    It's up to you :)
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    make a attribute called score and one called newScore. Whenever you want the score to go up change attribute newScore to newScore+100 (replace the 100 with whatver you want to add to the score) then have a rule when attribute newScore is > score, interpolate the score attribute to the new score attribute

    cheers
  • P373GamesP373Games Member Posts: 17
    Hey, thanks guys for the responses,

    I used the interpolate attribute and it worked except that it shows a lot of decimals instead of just scrolling by whole numbers, any idea how to fix this?
    Thanks!
  • MotherHooseMotherHoose Member Posts: 2,456
    in the interpolate game.Score To game.newScore
    change the To: {Function} ceil(game.newScore)

    as your going up use the ceiling Function to round-up the interpolation

    @};- MH
  • GLGAMESGLGAMES SingaporeMember Posts: 988
    Did you choose real or integer fir the attribute in the first place. If you dun want decimal use integer.
  • MotherHooseMotherHoose Member Posts: 2,456
    the attribute type defines how the value is stored

    Integer, Real, Index are all numerical values
    you can add/subtract/multiply/divide those numerical numbers by any number:

    the Integer will store/display whole positive or negative numbers;
    the Real type will store/display whole and decimal, positive or negative numbers;
    the Index type will store/display only whole numbers that are positive

    the Interpolate behavior incrementally changes an attribute from one value to another over a specified period of time (Duration)
    it does so in small fractional units (decreasing decimal placement value units … from 10,000th to none)
    and, ends by storing/displaying the value in the attribute's type of formatting

    indeed simpy changing an Integer Attribute: game.Score To: 20 … will do so in increments.

    what is really important here … is that no matter whether Integer, Real, or Index type
    If you chose to display the attribute … the Interpolation behavior will show the decimal values while running.

    for a score to display without decimals while interpolating to a newScore, because you want the nice look of gradual change,
    you can use a function: ceil(x) or floor(x); to round-off the numbers during the interpolation.
    replace the x in those functions with a selected attribute … in this case: game.Score

    @};- MH
Sign In or Register to comment.