How do I change a set of animations?

0 favourites
  • 4 posts
From the Asset Store
Simplistic hyper-casual game with nature elements. Tap to switch between the 4 elements and reach a better score.
  • I have a character, and he has a walk1 animation and a walk2 animation, for when he's walking left and right. When the character picks up an item, I want then walk1 and walk2 animations to change to different animations.

    So at the moment, it looks like:

    On left button down -> Play walk1a

    On right button down -> Play walk2a

    But when he picks up item A, I want this to happen

    On left button down -> Play walk1b

    On right button down -> Play walk2b

    How do I achieve this?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Set a global variable "WalkLeftAnimation" equal to "walk1a".

    On left button down -> Play "WalkLeftAnimation"

    Then on collision with item (or however you check if the player got the item) set "WalkLeftAnimation" to "walk1b".

    Another way of doing it is to add an instance variable to the player object to replace the global variable.

  • Set a global variable "WalkLeftAnimation" equal to "walk1a".

    On left button down -> Play "WalkLeftAnimation"

    Then on collision with item (or however you check if the player got the item) set "WalkLeftAnimation" to "walk1b".

    Another way of doing it is to add an instance variable to the player object to replace the global variable.

    Equal to walka?

    walk1a, walk2a and b are individual animations. I don't understand.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)