Stupid question about interpolate?

GuaveMediaGuaveMedia Member, PRO Posts: 1,262
edited May 2012 in Working with GS (Mac)
Hey guys,

I have a stupid question, I think that it is stupid but I don't know why it doesn't work.
I have three attributes: Level time, Level score and LevelFinished Attribute.

1,

When LevelFinished is true
Time is under 10
score is greater than 50
interpolate score to score +50

2,


When LevelFinished is true
Time is under 10
score is smaller than 50
interpolate score to score +20

But somehow it always interpolate to +50? I just replaced interpolate with change attribute and it worked...I am just using interpolate because the effect is cooler :)

Can somebody tell me why this is happening? I checked the attributes multiple times in the game...displayed them

thanks,

Alex

Answers

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    You cant interpolate to something+something

    Interpolate changes a value over time. So say score is 50. 50+20 would be 70. When the score starts to interpolate it would then say 52. 52+20 is 72. The value constantly changes.
    So what you want to do is change another attribute to score+20 and interpolate to that attribute.
  • simo103simo103 Member, PRO Posts: 1,331
    interpolating a 'moving' value is messing it up. Your score is now a moving value and thus interpolate doesn't now what to do. You will need to create an attribute NewScore. Put in the rule to change NewScore to Score +20 or +50 and interpolate Score to NewScore
  • simo103simo103 Member, PRO Posts: 1,331
    Just so you know why .... interpolate works out the 'steps' to get from teh first value to the next and then divides the time you set into equal parts. IE: 1 to 10 over 1 second would set up ten steps 0.1 sec each. Interpolate can't do that when the values are changing along the way.
Sign In or Register to comment.