Else Statements

This forum is currently in read-only mode.
  • Hi, I'm having a bit of trouble getting else statements to work, as I understand it, they would work similarly to TGF's negate function no?

    for example I have something like:

    If controller is moving, change the character sprite animation to walking


    change character animation to stopped

    Now logically it looks as though it would work, but whenever I try it, all i get is the stopped animation and no walking. EIther I dunno how to use the else statement right or something is wrong <img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" />

    Help! lol

  • My guess is animations are broken <img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /> Else runs when the event above it does not run:

    + Global variable 'My value' = 0

    : Do something

    + (separate event) Else

    : Do something else

    Else in this case is like a shortcut for "Global variable 'My value' does not equal 0". It runs when the event above it does not.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • <img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" />

    I made a little .cap file that tried what you just said, I can email it to you if you want.

    But all that happens is anything in the else event happens ALL the time and the event above it does nothing.

    At least that's what happens on my machine...

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