Having issue with the | operator

Get help using Construct 2

Post » Mon Jul 21, 2014 11:05 am

I am trying to learn how to use the | operator, but I don't have much luck with it.
Have tried to search, but I am still missing something important about | :?
I have made a small simple capx for this, hopefully one can point me out where I am doing wrong.

Pressing S will add 1 to global variable, Pressing D will substract 1 from the global variable.
When the global variable is 0,2,4 or 6. A text box should show the word "Even".
When it is 1,3,5 or 7. The textbox should display "Not even".
You do not have the required permissions to view the files attached to this post.
It's time for me to return the favor :)
B
32
S
9
G
9
Posts: 132
Reputation: 5,375

Post » Mon Jul 21, 2014 11:29 am

You can't use

Variable1 = 1 | 3 | 5 | 7

try

Variable1 = 1 | Variable = 3 | Variable = 5 | Variable = 7
You do not have the required permissions to view the files attached to this post.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Mon Jul 21, 2014 12:01 pm

Ahh, thank you very much.
That helps me a lot!

Cheers :D
It's time for me to return the favor :)
B
32
S
9
G
9
Posts: 132
Reputation: 5,375

Post » Mon Jul 21, 2014 12:04 pm

ikke2902 wrote:Ahh, thank you very much.
That helps me a lot!

Cheers :D


you're welcome
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596


Return to How do I....?

Who is online

Users browsing this forum: dahu, R0J0hound and 6 guests