# Is there a mod expression for construct 2

Just started using Construct 2? Post your questions here

### » Tue Jul 15, 2014 11:03 am

I've been following this tutorial called Build a Canabalt-Style Infinite Runner From Scratch () (he uses Multimedia Fusion 2)

and around the 13.06 he uses an expression called modulus (mod) and i been looking but can't find anything like that for construct 2.

Is there anything like that or similiar that I can use?
B
3
Posts: 2
Reputation: 179

### » Tue Jul 15, 2014 11:10 am

@uzmaaaaan

Modulus is % in Construct 2

e.g. 12%10 = 2

See manual on Expressions and look under Operators

Manual wrote:Operators
You can use the following operators in expressions:

- (subtraction)
* (multiplication)
/ (division)
% (modulo, remainder after division)
^ (raise to power, e.g. 5 ^ 2 = 25)
& (build strings, e.g. "Your score is: " & score)

There are also comparison operators =, <>, <, <=, >, >= for comparing values. They return 1 if the comparison is true or 0 if false.
Find all the Construct 2 games that were on Steam Greenlight here
B
39
S
11
G
7
Posts: 510
Reputation: 7,274

### » Tue Jul 15, 2014 12:55 pm

Message: uzmaaaaan is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
OddConfection wrote:@uzmaaaaan

Modulus is % in Construct 2

e.g. 12%10 = 2

See manual on and look under Operators

Manual wrote:Operators
You can use the following operators in expressions:

- (subtraction)
* (multiplication)
/ (division)
% (modulo, remainder after division)
^ (raise to power, e.g. 5 ^ 2 = 25)
& (build strings, e.g. "Your score is: " & score)

There are also comparison operators =, <>, <, <=, >, >= for comparing values. They return 1 if the comparison is true or 0 if false.

thank you
B
3
Posts: 2
Reputation: 179