Strange issue in a turn base environment

0 favourites
  • 6 posts
From the Asset Store
A well commented RPG game template to learn from or use as a base for your own game!
  • I'm actually building my turn base card game, with REX chess plugin.

    As in the demo, i put a structure like this

    deckboard with boolean variable called turn

    IF TURN-->

    player 1 select his cards (touch event) and plays them

    ELSE

    player 2 do the same with his cards

    The problem is that during TURN player 1 can also select and play player 2 cards

    This is not happening in other turn, O_o

    Player 2 can't select player 1 cards...

    Seems that events events after ELSE are triggered even if it shouldn't

    I'm really confused...

    Any suggestion is really much appreciated!

  • You should go to the plugin's page and inform

  • mmmh, i don't think it's a problem related with rex plugin. The issue seems to be about the Else statement not working correctly

    Now i tried to replace the else statement with a normal condition

    if is turn

    if is not turn

    Now it's not having that issue...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • mmmh, i don't think it's a problem related with rex plugin. The issue seems to be about the Else statement not working correctly

    Now i tried to replace the else statement with a normal condition

    if is turn

    if is not turn

    Now it's not having that issue...

    Yes, else can get tricky sometimes.

    I looked again at description of your problem, and my solution from top of my head would be

    if is P_1 turn

    if is Ai_1 turn

    or

    if is P_1 turn

    Else

    Or

    if is P_1 turn

    Else, if is AI_1 turn

  • yes, i tried

    If Boolean is 1 / If boolean is 0

    In this way it's ok, it works... however that's strange, really. Shouldn't work in this way.

  • I remember reading in the past that the Else doesn't work as intended in some situations, perhaps this is why

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