OR block bug

Bugs will be moved here once resolved.

Post » Mon Apr 25, 2016 4:31 pm

About the last capx you placed.



You always start at the bottom condition, and trace back. Knowing that: a pick condition looks at only the objects in the previous picked list of objects. Unless the list is forgotten. Forgotten is not the same as empty. So. When the list is forgotten you can read in the manual as i linked it for you.

- The does not work section:

Starting at the 'cursor is over sprite'. The previous picked list for that condition is made by the 'sprite is not on screen' condition. Al sprites are on screen, so that picked list is empty. Meaning, the 'cursor is over sprite' does not find any sprite in the SOL, and can therefor never be true. There are no referenced or unreferenced objects in the actions section, so we do not have to talk about at that. Althaught thats is mostly the problem. Because since the SOL is empty, no action can ever work on the sprite object.

- The works section.

Starting at the 'cursor is over sprite'. That is a new 'top' condition. Or 'root' condition, or how you want to call it. This means that there is no previous picked list. The picked list is forgotten. Not the same as empty !. Just forgotten. So, in fact, it makes its own pick list from scratch, starting from all the sprites again. And in the picklist that it made are all sprites that are overlapped by the cursor included.

Same for 'sprite is not on screen' in there. It has no previous picked list, because it is a root, a new condition. So it has all the sprites to pick from.

Dont know how to explain it better to you. I hope i made things a little clear.

So, basecaly. When you compare 2 'pick condtions' (in an or, or an and, or an else, or in a sub) you have the obvious flag true/false. But besides that, the mutch more importand 'previous SOL'.

Two things can happen.
1/ Althaught the flag reads true as you expect it to be, the actions can get an empty SOL, an therefor work, but work on nothing.
2/ The second (or third, 4th, 5th ....) condition can look for objects that are excluded by the previous picked list. Than the condition will not be true.

There is one more way for me to state it more clear. When i may say it in my moms language. : )
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Mon Apr 25, 2016 5:03 pm

@Colludium
I can confirm the bug. You can re-arrange it without an else to show the "or" is the only issue:

every tick:
--- set text to false

mouse is overlapping tiledbackground
-or-
sprite is overlapping tiledbackground
--- set text to true


For me the second condition in the "or" block is always ignored.
B
92
S
32
G
107
Posts: 5,274
Reputation: 69,959

Post » Mon Apr 25, 2016 6:20 pm

Thanks for checking, @R0j0hound, that's good to know.
A big fan of JavaScript.
B
74
S
20
G
69
Posts: 2,211
Reputation: 43,844

Post » Mon Apr 25, 2016 9:57 pm

Ok.
Explain the difference between the 2 events in this capx, plz.

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

Post » Tue Apr 26, 2016 5:23 am

@99Instances2Go, you have just re-hashed my bug report. The first OR in your example works like a broken/locking AND condition and not an OR condition. The reason this happens is there is a bug in c2 :p ....

Please stop spamming my bug report and let the c2 devs work this; are you still insisting that this is not a bug?
A big fan of JavaScript.
B
74
S
20
G
69
Posts: 2,211
Reputation: 43,844

Post » Tue Apr 26, 2016 7:22 am

If it is a bug, both must fail. The only difference is the SOL. And the SOL works as advertized in the manual.
Also, the second event works, as proven.

It is, in my opinon, virtual impossable to program c2 in a way that picking from the previous SOL behaves as an or.
There is therefor ofcours also no OR exception in the manual when the manual explains the way that pick events work.

Its, on the other hand, possible to add an extra condition to the system dat behaves like the existing 'compare 2 values'. And that could be 'compare if objectx overlaps objecty'. Without, just like the existing 'compares' altering the SOL. Can be done for collisions to.

But, if that comes to c2, i surely hope someone else will explain the differende between a 'compare if objectx overlaps objecty' and a 'on overlap between objectx overlaps objecty"
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Wed May 04, 2016 3:48 pm

I think the issue is specifically with the "mouse is over object" condition's picking when in an OR block, and the touch "is touching object" works similarly. I've fixed them for the next build so all three cases in the OP work.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,772

Post » Wed May 04, 2016 8:20 pm

:)
A big fan of JavaScript.
B
74
S
20
G
69
Posts: 2,211
Reputation: 43,844

Previous

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest