Is this a bug in construct with OR statements?

Just started using Construct 2? Post your questions here

Post » Sun Mar 20, 2016 9:36 am

Try this:

Make a new project and some text box. Make two variables in it and make one global. Set the global to 1.

Now make it check variable one is equal to zero.

Then make a sub event in that, in which you check if the global is above zero and the second variable is below zero as an OR block. And yes, it is an OR block in my test run. If the or block is true, make it change the text to something else.

Can anyone else reproduce this error where the text doesn't change/the OR block does not trigger?
B
52
S
15
G
4
Posts: 191
Reputation: 5,612

Post » Sun Mar 20, 2016 10:13 am

Is this what we talk about ?

https://
drive.google.com/open?id=0B1SSuCVV8v74NTYwNkZucTdzNkE

There are two bloks because i cant figure out wich 'one' is meant in "Now make it check variable 'one' is equal to zero."

Subevents run if there parent(s) is (are) True.

Under the left mouse, the OR-subs only and only run if te local var = zero.
Under the right mouse, the OR-subs can never ever run because you stated that de global var should be 1.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Sun Mar 20, 2016 10:43 am

99Instances2Go wrote:Is this what we talk about ?

or

Image
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Sun Mar 20, 2016 10:52 am

If variable1 = 0
THEN (in sub event) : if global>0 OR variable2=0 THEN Change the text

It doesn't work when it should work.

I'm in ver 216 of construct and can't open your file - I'm on a bought copy of construct and am not sure of the process of updating (I don't want to screw up something when it's working fine for me...apart from this issue)
B
52
S
15
G
4
Posts: 191
Reputation: 5,612

Post » Sun Mar 20, 2016 11:31 am

No prob. Upload a Cap. I am lost (but that is nothing new).
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Sun Mar 20, 2016 9:19 pm

I don't use any file services and this forum wont let me post links still, iirc.

To simplify bit Just take korbaach's example, remove the mouse and global test part and just use the OR part of it by itself,

I've just done that and the OR statement will not fire. It's instead acting like a AND statement.
B
52
S
15
G
4
Posts: 191
Reputation: 5,612

Post » Sun Mar 20, 2016 11:54 pm

I post that example because noticed that
Callan S wrote: acting like a AND statement.
in 216..but it's fixed for 221..so it is likely old bug
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Mon Mar 21, 2016 1:01 am

I own a personal licence for construct - what's the update process? Just download it and install it again? I'm just not familiar when it comes to purchased products.
B
52
S
15
G
4
Posts: 191
Reputation: 5,612

Post » Mon Mar 21, 2016 1:56 am

Just go to the bottom of this page, download the latest stable release (safest), and run the installer. It's pretty straight forward.
ImageImageImage
B
71
S
22
G
257
Posts: 3,788
Reputation: 142,692

Post » Mon Mar 21, 2016 2:47 am

Okay, I've updated and the OR statement still doesn't work!

It's the global that breaks it - if it checks two instance variables, it's fine. But check a global and an instance variable and it becomes an AND statement rather than an OR statement.

I guess having checked here first, I'll post in bugs soon.

Edit: Wow, posting a bug looks to be quite a hassle
B
52
S
15
G
4
Posts: 191
Reputation: 5,612

Next

Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest