Conditioning (collision/animation)

This forum is currently in read-only mode.
  • I believe this is another basic question from me.

    There are 4 sprites on a nearly white canvas.

    When the "enemy-sprite" collides with 1 sprite, I would like to see an animation playing on only that 1 sprite, where the collision happens.

    Everything is ok when I do:

    Enemy: on collision between Enemy and Sprite

    sprite: set animation to "dance"

    But when I add as a 2nd condition:

    Sprite: animation is not "dance"

    all 4 sprites change their animation and react to the collision, which only happens on 1 sprite.

    Confused me.

    Because I thought the conditions are as follows:

    • collision happening between red and sprite

    and

    • animation is not "dance"

    The other 3 sprites do not have any collision going on, so why do they react to this?

    Is this bug?

    Awaiting your reply.

  • Is the condition within the same event?

  • Is the condition within the same event?

    yes

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh, I see... you are filtering by Enemy, not Sprite.

    Set the collision condition to Sprite: on collision with Enemy. Or use the advanced overlapping, which can filter both.

  • Oh, I see... you are filtering by Enemy, not Sprite.

    Set the collision condition to Sprite: on collision with Enemy. Or use the advanced overlapping, which can filter both.

    Wow, I didn't know that.

    I never thought it mattered which object (sprite or enemy) should be selected first to make a collision-condition...

    I will try that out tomorrow. Thanks.

  • It's totally working

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