Is there any "not equal" operator for expressions?

Get help using Construct 2

Post » Fri May 23, 2014 10:53 pm

If I want to do this :
pick by evaluate -> object.variable = 100 & object.variable2 != 5

Can I use a single expression or should I create two conditions as following :

pick by comparison -> object.variable = 100
pick by comparison -> object.variable ≠ 5

?
B
12
S
7
G
7
Posts: 450
Reputation: 4,276

Post » Fri May 23, 2014 11:00 pm

Coin-coin le Canapin wrote:If I want to do this :
pick by evaluate -> object.variable = 100 & object.variable2 != 5

Can I use a single expression or should I create two conditions as following :

pick by comparison -> object.variable = 100
pick by comparison -> object.variable ≠ 5

?


you could do :

Image

But in that case, you are comparing instances variable, so just use Object>Compare instance variable:

Image
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Fri May 23, 2014 11:42 pm

Thank you very much! I read the manual about expressions but I didn't figured out that this operator was similar to !=.

Why do you prefer two conditions instead of one expression? Is it faster?
B
12
S
7
G
7
Posts: 450
Reputation: 4,276


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 25 guests