OR condition not working correctly

1 favourites
  • 4 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • This condition here it NOT working (the boolean is not set to true):

    But this one (which is logically the same) works fine:

    What am I missing here?

    Tagged:

  • Thing gets even more interesting this logging that I just did

    while I'm on the floor I can correctly see the logging, but the boolean stays false unless I start to wall slide

    (could it be that I found a bug?)

  • OR doesn't always do what you think in C3. The issue is the first isn't actually a boolean, it's a picking condition. So it picks all of the Player objects with the boolean, of which there are none! So when the second OR condition succeeds, the first action can't do anything, because there are no items picked to set the new boolean value to!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok I managed to solve the issue, sometimes reading the docs carefully helps

    In events, conditions filter instances that meet some criteria. They appear to the left of the event. All conditions in an event must be met by at least one instance for the actions to run. The actions then only apply to the instances that met the conditions.

    In my case the instance that I wanted was not picked as the "Player", is yes floored, but not wall sliding.

    Long story short I decided to move all instance variables to my mask object, so that I don't have to deal with something like this later on in the future.

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