Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

i need help with interpolating a score.

guillefaceguilleface Posts: 997Member
edited March 2012 in Working with GS (Mac)
instead of just changing a score i want to give it a nice effect , so i am trying to interpolate "cash" to( "cash"+"bonus"). i do get a nice effect but why if my cash is =20000 and i add a bonus of 1000 after interpolating this, i get a crazy amounts like 47585.6, 423545, etc. instead of 21000?


  • simo103simo103 Posts: 1,331Member, PRO
    edited March 2012
    @guilleface .. interpolate (if I am correct) ... determines the number of spaces between two values based on the duration you set and then starts moving to that second value. (IE: 1 to 10 for 1 second would work out to be 1 number change every 0.1 second). Because your cash+bonus starts changing as the interpolate starts it messes up the intervals between the two numbers. You will need to setup a timer which a change attribute in it to get the effect you are going for.
  • guillefaceguilleface Posts: 997Member
    hi tshirtbooth, i changed my attributes from real to index but i still get decimal points, is this possible or i might being doing something wrong? and i know this will sound hard but is there a way to slow down the numbers depending on the amount, like interpolating 500 in a second looks ok but if its 50000 then it looks way to fast. i am trying having a score like the one you play on the slot machines .
  • guillefaceguilleface Posts: 997Member
    hey tshirtbooth i still getting decimals, so i checked twice by doing this, i create a new index attribute lets called "money", so i have a actor to display "money" ok, so on this same actor i have a rule, after 5 seconds interpolate "money" to 1000, and i get decimals points. any ideas why?
  • guillefaceguilleface Posts: 997Member
    sure, just let me clean up a little the code, whats your mail?
  • guillefaceguilleface Posts: 997Member
    sent, thanks
  • guillefaceguilleface Posts: 997Member
    hey tshirtbooth i thing i found the problem, on displaying the score, i saw one of your videos that i need to do on the display rule, floor(attribute), so is good now. just one thing, is possible to add customes numbers to this interpolating attribute?
  • guillefaceguilleface Posts: 997Member
    i watched that one already i just didn't know how to combined interpolate with the floor formula but is workings perfect now, i have not try the thing about the speed, as the firs 2 digits, 10 and 100 value are the one going to fast but i think this is how it suppose to be right. thanks a lot for those great videos tshirtbooth
This discussion has been closed.