[SOLVED] Or And

Just started using Construct 2? Post your questions here

Post » Tue Dec 08, 2015 12:31 pm

Hello, currently construct can do this:

condition 1 or condition 2.

Image

OK

But this I can not do:

(Condition 1 and Condition 2) or Condition 3

Image
It is a modified image.

I'm wrong?.
Or if it can be done ?.
Last edited by The Mnk on Tue Dec 08, 2015 4:35 pm, edited 1 time in total.
B
28
S
11
G
20
Posts: 729
Reputation: 13,674

Post » Tue Dec 08, 2015 3:26 pm

one way

compare two values

1=( (jugador.x<manzana.x-48) & (jugador.x>=manzana.x-64) ) | (jugador.x<manzana.x-200)
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,782

Post » Tue Dec 08, 2015 4:23 pm

I'm not sure I understood.

If I use "compare two values" twice and then add "make or block", happens this:

Image

I want to do this, to add a third condition and get what would this:

((condition 1 and condition 2) or condition 3)

Image
Modified image
B
28
S
11
G
20
Posts: 729
Reputation: 13,674

Post » Tue Dec 08, 2015 4:30 pm

Ok, you wanted to say this:

Image

Thanks!.
B
28
S
11
G
20
Posts: 729
Reputation: 13,674

Post » Tue Dec 08, 2015 6:00 pm

no, I wanted to say

add condition
make this a system condition
select the
general - compare two values

in first value - 1

in second value - ( (jugador.x<manzana.x-48) & (jugador.x>=manzana.x-64) ) | (jugador.x<manzana.x-200)

The "&" is logical AND the "|" is logical OR
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,782

Post » Tue Dec 08, 2015 6:20 pm

Ok, I think I understand, there are several ways of doing this.

Image

Thanks again.
;)
B
28
S
11
G
20
Posts: 729
Reputation: 13,674

Post » Wed Dec 09, 2015 8:47 am

Mirlas wrote:Ok, I think I understand, there are several ways of doing this.




There are always several ways of doing anything in programming ...


Glad I could help
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,782


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest