Joystick driven actor animation issues

HaleyFHaleyF Member Posts: 7
edited May 2012 in Working with GS (Mac)
Hey guys. I'm super new so I apologize if this is a silly questions.

I've used the codemonkey joystick base for this and have the man actor going alpha.0 on collision, being replaced by an animation.

Couple questions. And I've uploaded a video here..

1. Before the animation starts the bread turns to white. I know this is because the color of the actor is white. How can I make it not do this?

2. Is there a way to "trap" the flying man actor in place until the animation on the toast is finished?

3. And finally is there a way to make the toast disappear as soon as the animation is complete.

Thanks for reading this!

Answers

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    1. Do you have "Restore actor image when done" checked on the Animate behavior? If so, uncheck it.

    2. Depending on how you are moving the flying man actor, you can do change attribute self.motion.linear velocity.x/y to 0 for a number of seconds using a timer.

    3. Once the timer is done, change an attribute (e.g. game.animationOver) and on the toast actor do When game.animationOver is true, destroy/change alpha to 0.

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

  • HaleyFHaleyF Member Posts: 7
    That was extremely helpful thank you!

    Everything worked perfectly, but when the spaceman is stuck on the toast, waiting for the toast animation to finish, I can still scroll around and then when it's done he snaps to wherever i am.

    Is there a way to freeze the joystick as well so you can't move the screen around until the animation is finished?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    I haven't used that controller template before, but one way is to wrap all of the rules for the joystick in a rule that has the condition When game.animationOver is false. That way, clicking/tapping on the actor or screen won't do anything until the animation is over (or hasn't started yet).

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

Sign In or Register to comment.