Constrain animation?

DrGlickertDrGlickert Member Posts: 1,135
edited November -1 in Working with GS (Mac)
I'd like to constrain an animation to another actor's position.Y

So when the actor moves up, the animation goes forward, and when the actor goes down, the animation goes backwards.

Does this makes sense?
Is this possible?

Comments

  • osucowboy18osucowboy18 Member Posts: 1,307
    Hey doc,

    Try this.

    Make a global real variable called Y Position. Then, in the actor that moves up/down add this behavior.

    Constrain Attribute: game.Y Position TO self.position.y
    This will continuously keep track of that actor's position on the Y axis.

    End Code

    Next, put the animation behavior in a separate actor. Then put this code in that actor.

    Constrain Attribute: self.position.y TO game.Y Position.
    Animate: Your images here

    End Code

    This should do the trick. Good luck.

    - Alex
    _________________________________________________________________________________

    Custom Soundtracks and Sound Effects For Sale
    Vertical/Horizontal Level Select Template
    Mac Mini For SALE!!!
Sign In or Register to comment.