How do I do simple math? SOLVED

Just started using Construct 2? Post your questions here

Post » Wed Oct 01, 2014 6:36 pm

Hello everyone,

So about 2 weeks ago, I started using construct 2, wondering my way through tutorials, and the prebuild games to learn...
And today when Helping my niece and nephew with math, I remembered a old math racing game I used to play when I was young... (I won't mention the name...)
So I pulled out construct 2 (since original version still costs WAY TO MUCH) and I began to setup a simple math game...

so I got my basics setup, but I can't do simple mathematics...

I need to compare (Random Number 1) + (Random Number 2) to make sure it does equal what they put into the text box...
(other math should be easy as long as I know how to do the addition)

I've tried this with anything I can think and tried quite a bit more...

it just seems I'm missing the button that says, "do simple math problems", it seems like CS2 should have something...
Any help is greatly appreciated!
Thanks
Justin
Last edited by antares330 on Wed Oct 01, 2014 7:22 pm, edited 1 time in total.
Eat ALL THE BACON!
B
47
S
17
G
3
Posts: 290
Reputation: 5,068

Post » Wed Oct 01, 2014 7:22 pm

To anyone else needed this

after a bit more looking into it, I found out, use the int() to bring in my numbers, and then a simple system compare variable was good enough...

If you need a bit more explaining just message me...
Justin
Eat ALL THE BACON!
B
47
S
17
G
3
Posts: 290
Reputation: 5,068

Post » Thu May 28, 2015 2:39 pm

Hello @antares330
Can you please explain to me how this simple mathematics works in C2. I really need this to finish my game.

Can C2 do this:
Example:
there are 3 variables
Value1
Value2
Value3

I want C2 to calculate Value1 + Value2 = Value3 , where the Value1, Value2, and Value3 only between 0-9, not more not less.
For example: An enemy is destroyed, the instance the enemy is destroyed, then all the Values Value1, Value2 and Value3 is set between 0-9 but also using the equation Value1 + Value2 = Value3 at the same time

Sorry for my English, it is not my mother tongue
B
3
Posts: 5
Reputation: 177


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests