Why am I struggling with Interpolate here?

DrGlickertDrGlickert Member Posts: 1,135
edited November -1 in Working with GS (Mac)
I have an actor that has a Rule that looks like this:

When game.attribute = 1, interpolate self.color to 0 over .5 seconds. in the OTHERWISE section I have another rule that When game.attribute = 0 interpolate self.color to 1 over .5 seconds.

This should give me a fading in/fading out effect. However, it doesn't work. Why does this not work?

Comments

  • DrGlickertDrGlickert Member Posts: 1,135
    DrGlickert said:
    I have an actor that has a Rule that looks like this:

    When game.attribute = 1, interpolate self.color to 0 over .5 seconds. in the OTHERWISE section I have another rule that When game.attribute = 0 interpolate self.color to 1 over .5 seconds.

    This should give me a fading in/fading out effect. However, it doesn't work. Why does this not work?

    Meaning, it fades out okay. But it doesn't fade back in correctly.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    did you select ease in on the second interpolate?

    Also you dont have to have the second interpolate in a rule when game attribute=0. Having it in the otherwise section will do that for you, cause whenever the attribute is not 1 ( mening 0) it will do the behavior. No need for the extra rule.
  • DrGlickertDrGlickert Member Posts: 1,135
    Wait. It works. I had code wrong. I suck at this right now.
  • InLikeFlynnInLikeFlynn Member Posts: 171
    You said in the otherwise section you have another rule for when game.attribute=0. Could you just have the interpolate in it's own rule instead of in otherwise? Sometimes individual rules trigger when otherwise doesn't.

    edit: nm.
Sign In or Register to comment.