My interpolated actors hang around when they're not supposed to...

Ok so I have an attribute that is either 0 or 1 by pressing a button (my attribute+1)%2
When my attribute=1 then I have a few actors that interpolate (ease in, duration 0.3 sec) to an on screen position
When my attribute=0 these same actors interpolate (ease out, duration 0.1 sec) of the screen's view.

Problem is when I press the my attribute button quickly the actors that interpolate on/off screen get confused. Sometimes they hang around on the screen when they aren't supposed to. How can I setup my rules so that these actors don't get confused when I press the button quickly?

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Add a condition to the rule where you have your interpolate behavior that requires the position (either X or Y) to be the starting/ending position of that actor.

    So for example, if you have an actor that moves from Y=-100 to Y=200 and back again to Y=-100, you would have a condition When attribute self.Position.Y=-100 --> Interpolate self.position.Y to 200 and a separate rule that says When attribute self.Position.Y=200 --> Interpolate self.position.Y to -100.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.