animate opacity

zombie_farmzombie_farm Member Posts: 33
edited November -1 in Working with GS (Mac)
Ok I know this is totally simple but I just can't seem to get my head around it. I want to animate the opacity slowly up then when it reaches 100% animate it back down.
I made two attributes one for on and off.
and the other integer to plug into the opacity channel.

any help?
thanks

Comments

  • WeswogWeswog Member Posts: 1,171
    You can use interpolate to do that easily :)


    Cheers, Weswog
  • quantumsheepquantumsheep Member Posts: 8,188
    You can use interpolate

    Have it change attribute 'self.opacity' to 1 over 2 seconds say.

    Then have a rule

    if self.opacity =1
    interpolate self.opacity to 0 over 2 seconds

    (I'm using '2 seconds' as an example - you can adjust to suit, obviously)

    Hope that helps!

    QS :D

    Edit: Beaten by Weswog to the punch! Kids these days are so fast! ;)

    Edit2: Don't forget to set the actor's initial opacity to 0

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • ValanValan Member, BASIC Posts: 410
    The easiest way is to use interpolate.
    Start by interpolating the alpha when the actor starts.

    Use a rule when it = 1
    Interpolate to 0

    Use another rule when it = 0
    interpolate to 1

    You may get collision problems and you may lessen this by adding pauses at 0 and 1 so the actor is not always in Interpolate mode.

    Another way is to use timers and Change Attribute.

    Hope this helps

    Edit: WOW! so quick
    And I was hoping to be first!

    Edit: Nice video, Weswog.
Sign In or Register to comment.