[solved] Array object don't work in IF w/OR and sub-IF

Report Construct 2 bugs here.

Post » Fri May 18, 2018 7:03 am

Problem Description
In an event IF (with OR) and sub event IF. If the 2 events have an array object, it lose something making a bug.

Note: check how IF work in "b" when I use System compare. It fail only when use Array compare.

Attach a Capx
https://drive.google.com/open?id=1ED6gdUXprnqjrmdwB7pTUTqXvP3lWiuy

Description of Capx
Write a text to see what IF work.
Image

Steps to Reproduce Bug
F4 and read the text.

Observed Result
"found z" never show

Expected Result
"found a" and "found b" is the same IF than "found z", but it never write.

Affected Browsers
  • FireFox: YES
  • Chrome: YES

Operating System and Service Pack
Win7

Construct 2 Version ID
Release 259 (and also tested on 245)
Last edited by MTR on Fri May 18, 2018 10:58 am, edited 1 time in total.
B
10
S
5
G
1
Posts: 28
Reputation: 1,456

Post » Fri May 18, 2018 10:13 am

Add "pick all Array" to redo the second check taking into account the array that is rejected in the upper if / or.
In traditional programming this does not happen.

Image

What happened is that in the if / or the array was rejected because its element number 0 is not equal to 0, but the if / or turned out to be true by typeID = 1...

So it works too

Image
B
36
S
15
G
22
Posts: 956
Reputation: 15,222

Post » Fri May 18, 2018 10:58 am

Thanks @The Mnk for the answer. It work.

This is a bad "feature" of the C2... I hope this change in the C3.
B
10
S
5
G
1
Posts: 28
Reputation: 1,456

Post » Fri May 18, 2018 11:16 am

There are several reports on this but I think that Scirra is not going to modify it.
B
36
S
15
G
22
Posts: 956
Reputation: 15,222


Return to Bugs

Who is online

Users browsing this forum: The Mnk and 2 guests