Strange issue in a turn base environment

Discussion and feedback on Construct 2

Post » Mon May 11, 2015 7:52 pm

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! :)
B
6
S
1
Posts: 73
Reputation: 569

Post » Mon May 11, 2015 10:16 pm

You should go to the plugin's page and inform @rex_rainbow
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
89
S
30
G
22
Posts: 1,985
Reputation: 20,099

Post » Tue May 12, 2015 6:58 pm

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...
B
6
S
1
Posts: 73
Reputation: 569

Post » Tue May 12, 2015 8:04 pm

pcprice76 wrote: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
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
89
S
30
G
22
Posts: 1,985
Reputation: 20,099

Post » Wed May 13, 2015 8:30 am

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.
B
6
S
1
Posts: 73
Reputation: 569

Post » Wed May 13, 2015 3:42 pm

I remember reading in the past that the Else doesn't work as intended in some situations, perhaps this is why
B
7
S
1
Posts: 39
Reputation: 511


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 18 guests