Depending on what and why you need it and how youre implementing the numbers in the game. But with Rules and Behaviors, this shouldnt be a problem at all. Heck using tables is a possibility.
it's better if I give you more details guys.
I have two actors; each one spawn random numbers and I have to do a division (first actor / the second) and result has to be an integer number not float like for example 2.67.
For sure the first one has to be bigger then second (at least the same value). This i the reason why I asked for even numbers.
Hoping my description is clear, I thanks for your time!!
@Disimob said:
For sure the first one has to be bigger then second (at least the same value).
If they are the same value, the result will always be 1, 1 is not an even number.
tatiangMember, Sous Chef, PRO, Senior Sous-ChefPosts: 11,949
@Socks I think @Disimob wants to choose two random even integers that when divided (large÷small) equal an integer. But the result doesn't have to be even.
@Disimob is that accurate? And why not provide that info in the first post?
If you are creating a math practice game, there is an easier way to always get the answer to be an integer.
First, randomly generate the answer.
Then, randomly generate the second number.
Then, to get the first number, multiply the second number by the answer.
Comments
Might need more details.
Here's one two.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Depending on what and why you need it and how youre implementing the numbers in the game. But with Rules and Behaviors, this shouldnt be a problem at all. Heck using tables is a possibility.
thanks tating for demo!
it's better if I give you more details guys.
I have two actors; each one spawn random numbers and I have to do a division (first actor / the second) and result has to be an integer number not float like for example 2.67.
For sure the first one has to be bigger then second (at least the same value). This i the reason why I asked for even numbers.
Hoping my description is clear, I thanks for your time!!
If they are the same value, the result will always be 1, 1 is not an even number.
@Socks I think @Disimob wants to choose two random even integers that when divided (large÷small) equal an integer. But the result doesn't have to be even.
@Disimob is that accurate? And why not provide that info in the first post?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
If you are creating a math practice game, there is an easier way to always get the answer to be an integer.
First, randomly generate the answer.
Then, randomly generate the second number.
Then, to get the first number, multiply the second number by the answer.
Example:
Answer = 5 (randomly generated)
2ndNum = 3 (randomly generated)
1stNum = 5*3 = 15
Then present the game problem:
15 / 3 = ?
Answer = 5
Too easy.
Hi eversione
Sorry U got reason. I Had r
To give you more info
.... Could you give a real example?? I promise it is my Last request
Here you go.
Thannnksssss