'Or' not working in certain events

0 favourites
  • 3 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • I haven't found any pattern in it, but occasionally Or refuses to work. It does it with perfect consistency in those specific events that show the issue, but I can't find any pattern in what makes it happen at all.

    On other occasions I've just worked around it, but right now that isn't a reasonable option. I need to use the Or event, unless I want to use some stupidly convoluted method to work around something that shouldn't even be happening.

    Here's a picture of the event

    <img src="http://img7.imageshack.us/img7/7854/errorbzr.png" border="0" />

    It's supposed to make it so that the player can hang from an edge if EITHER the player controls are not locked OR the player is running up a wall (which locks controls).

    What actually happens is that the player can ONLY hang from an edge if they ran up the wall to it. No matter what I change that first value to in order to be certain it absolutely should trigger, it just doesn't as long as I have "Or is running up the wall".

    If I remove that "Or is running up the wall" part then it works perfectly as it should, except the player cannot grab on after running up to it.

    Does anyone know of a way to work around this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It looks like you're trying to use this logic in the sub-event:

    If A or (B and C)

    Maybe try splitting those?

    E.g. like this

    1. if B and C then set flag "BandC = 1"

    2. if A or BandC=1

  • No, that's one event, not two. I'm just using a formula inside it.

    Basically I have two versions of each animation, one facing left and one facing right because the character's appearance is asymmetrical and cannot use Mirror without looking stupid.

    I have an instance variable storing the current direction the player is facing.

    When I need to read or play an animation, rather than having two separate events for each animation I just use that formula to choose the base name of the animation then append it with the current direction.

    So with a single event it will automatically choose the proper animation based on the player's current direction.

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