0 Favourites

How do I fix a card flip glitch

  • There is a glitch in this file that I have tried to fix for a week now. As you play the game if the opponent takes one of your cards and you select to take that same card back the card does not flip back to the face until the next time your hand is updated. I think this involves the 'Select Opponent' event. Im sorry if im not specific enough

  • There is a glitch in this file that I have tried to fix for a week now. As you play the game if the opponent takes one of your cards and you select to take that same card back the card does not flip back to the face until the next time your hand is updated. I think this involves the 'Select Opponent' event. Im sorry if im not specific enough

    Please remember to provide non-standard addon links. Your .capx uses 'Spritefont+' by Chris Kent and 'moveto' by Rexrainbow.

    I'd also advise updating C2 - r244 was from April 2017.

  • nez05

    When you take the card back from the opponent, its CardFace=0. That's why its animation frame is also set to 0 and shows card back.

    And then after 4 seconds the animation frame changes to CardFace2.

    I don't understand the purpose of all these instance variables - CardFace, CardFace2, FaceValue.

    If you change your event like this, it fixes the problem, but I'm not sure if this is a correct solution.

    https://postimages.org/

  • Thank you so much! You lead me to the problem, I couldn't understand which instance was coming into play after the 4 seconds.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • No problem!

    I suggest you use Debug Mode, it's very handy when troubleshooting.

    Also add debug output to your events, for example "Browser Log spCard.CardFace"

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