Switch animations while doing an action

0 favourites
  • 6 posts
From the Asset Store
Design for game, asset for game, game kit, UI design, completed design for game, mobile game, Dashify Switch
  • Hello everybody. I'm having a big issue that probably has a very simple solution: my platformer character has an idle animation when is on floor & speed=0, walking animation when is on floor & speed>0. That works fine, but I have another idle and walking animation when the character is carrying an object.

    If is on floor & is overlapping the object and touches a button, the char grabs the object. The idle carrying animation works just fine, but when speed>0 & is carrying, the movement works, but the animation just freezes on the first frame. I'm probably trying to trigger two animations at the same time, but I can't work it out. It would be awesome if anyone could help.

  • You need to add filter conditions, to check if an animation isn't already playing to avoid animations overriding constantly

  • You mean like a variable? I tried to do this with instance variables, but nothing changed

  • A variable can do the trick, can you share your project file? I can take a look into it if you wish

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I cant tell exactly what the issue is without seeing the events, but my guess is you have 2 different events

    speed > 0 -> play walk

    then below it somewhere

    speed > 0 & carrying object -> play carry

    in this case both will be true, so it will switch to the walk, then switch to the carry every tick, which will look like it's playing just the first frame.

    If that's the case, you just need to use sub events, like so:

    speed > 0

    (sub)carrying object -> play carry

    else -> play walk

  • Tomycase sorry man, I don't feel comfortable sharing my project for now, but thanks for the attention.

    Headbang Games Thanks a lot, that worked!!! Whenever I use sub events I always get stuck, but in this case worked perfectly!

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