How do I make a condition with modulo?

Just started using Construct 2? Post your questions here

Post » Tue Jul 14, 2015 1:33 pm

Hi!

I'm creating a simple tile-based prototype and I have a problem creating a condition. The thing sounds simple: I'm trying to check whether the modulo of object instance variable is equal to zero. If it is I want to change the value of the variable.
I can't find the way to do it: I thought that using "Compare instance variable" would do it, but it can only compare variable to the value - and I need to compare modulo of variable. Is there any way I can do it?
B
3
Posts: 2
Reputation: 179

Post » Tue Jul 14, 2015 1:36 pm

Something like this?

For each object
system compare two values : object.variable%2 = 0
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Jul 14, 2015 1:42 pm

Thanks, helped a lot!
B
3
Posts: 2
Reputation: 179


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests