Picker with OR statements not working properly

Bugs will be moved here once resolved.

Post » Fri Sep 02, 2016 3:18 am

Problem Description
When you setup a condition string a certain way, it fails and does not pick all the correct items, causing things to not be displayed properly.

Attach a Capx
http://www.nitrolic.com/error.capx
You may need to right click and save this one... I don't have capx in my htaccess file on my server.

Description of Capx
Capx should be self explanatory.

Observed Result
The way this is setup, it should first:
-Select all the sprites, but only the ones with "Left" as a boolean value set to true. After, it selects both "LeftSprite" and "RightSprite" based on the instance variable set by the sprite family... of which both sprites have the same ID... so technically, it should have three 'picked'.... one of which is picked twice (Left)
-The next step is where it fails.... if LeftSprite **OR** RightSprite has a weight of anything other than 0 then it should do the next step..... it goes to the next step like it should, but the next step is where you see the problem... it ONLY deletes one of the two. The problem here is, whichever sprite has a weight set to 0, it removes it from the "pick" list, instead of going through because one of them equals zero and keeping the pick list intact.

Expected Result
It should NOT remove it from the pick list.

Construct 2 Version ID
All versions including current beta.
B
47
S
15
G
3
Posts: 201
Reputation: 4,625

Post » Fri Sep 02, 2016 9:06 am

It continues because the condition is true.

And yes it removes the Left one from the picklist.
You dont want it to act different. What if you use the two conditions on there own ? Or in an and ?
Pick conditions do pick, there is no way arround that, they are designed to pick, and it is good as it is (my opnion).

It pleases me mutch dat you understand the picklist fully.
But, do you know that you can compare things without touching the picklist ? And that you should if that is what you want to do ?

Look :
https://drive.google.com/open?id=0B1SSu ... Wg2bjdETGs
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Sun Sep 04, 2016 6:50 am

Ahh.. never thought of comparing it using "compare two values".... good point. Thanks. :)
B
47
S
15
G
3
Posts: 201
Reputation: 4,625

Post » Wed Sep 14, 2016 1:29 pm

Closing as not a bug.
Scirra Founder
B
398
S
236
G
88
Posts: 24,433
Reputation: 194,635


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 3 guests