could someone tell me how mmf2 could decide the highest, or lowest number from a group of numbers.
i would want an answer with the min and max expressions, and one that doesnt have it.
Printable View
could someone tell me how mmf2 could decide the highest, or lowest number from a group of numbers.
i would want an answer with the min and max expressions, and one that doesnt have it.
Are the numbers recieved from somewhere? Are they just a list?
I think we all would appreciate it worded more like this:Quote:
Originally Posted by Zabooza
and if you can i would like to have it use the min and max expressions, and one that doesn't a have it.
By the way, what does that last bit mean?
(not for me, I probably can't help you much here, but so other people get your problem and are more willing to help :) )
srry i meant the question to be like this
how would i decide if a number is the highest out of a grouo of numbers.
if it possible with min and max expresions?
the last part was nonsense :)
How many values and how are they stored... I can think of a couple ways to do this but need a bit more information.
4 pairs of values
grouped in 2
8total values
are they stored in counters, edit boxes, a list object?
OP, if no one has a solution by tomorrow, I'll make you an example. I have to go though so I cant right now.
EDIT to above:
I'm not providing an example, but what I would do is test to see if a value is greater than all the other values, and if so, set a string, global value, or whatever you want to set.
ok, how would i do that with all 4 values?
You just repeat it. Here's an example with only 4, not 8:
Val=value
If
ValCounterA > ValCounterB
ValCounterA > ValCounterC
ValCounterA > ValCounterD
Then set string to "Value A is the highest"
Repeat:
If
ValCounterB > ValCounterA
ValCounterB > ValCounterC
ValCounterB > ValCounterD
Then set string to "Value B is the highest"
See where it's going?
I dont know if there is a simpler way but this seems logical to me.
ok i got that part down but lets say this;
each object has 2 values. named a and b
if value a is the same as someone else's value a, it goes to value b.
btw ty for that post
also not only do i want to find out which value is the highest, i want to be able to detect which is the 2nd highest, 3rd, and 4th, etc
You're very welcome.
I'm not sure I understand, "It goes to value b".
Oh ok! I get it now. May I ask why???
It might help if I knew the situation this is needed in.
idk, i guess it would be most like a mario party game where there are stars and coins. if someone has the same amount of stars, it goes to coins to see which place anyone is in.
although i hate mario party games :(
I would like to say, "You shouldn't even worry about it if you're not going to use it" but I'll answer it.
The easiest way I can see it is to ALSO test A=B, A=C, A=D, B=C, B=D, C=D or something along those lines. You just then need to find a way to rule out an equality if it lower than another equality, so if B and D were both 7, but A and C were both 56.
explain again plz
I cant really explain that one, I don't know how to fully do it, but you could start out by testing to see if any values are equal. The problem is that you may have 2 sets of equal integers. It's a little easier if you are actually coding it out but I am really into my own program right now and this sounds like it'd take a while to finish off, but do you understand the basis off what I'm talking about? You just would test if any values are equal.
ok, that is what i needed. ty
It's not going to be simple. There may be an easier way, so you might want to stick around and hope someone else answers.
Good Luck
dont worry, i think i already have it figured out, if it works, i will post it here
Thanks, I'd actually like to see it, and see how it works.
well i finally got the answer
note this is nowhere near complete!
there are 4 objects. each object is a player; player 1, player 2, player 3, and player
Player X
Alterable Value A
Alterable Value B
Alterable String A
IF NO ONE IS TIED
Plz add on if you can. I had "If 2 people were tied", but i messed up on the pagesQuote:
Quote:
+ Alterable Value A of Player 1 > Alterable Value A of Player 2
+ Alterable Value A of Player 1 > Alterable Value A of Player 3
+ Alterable Value A of Player 1 > Alterable Value A of Player 4
-Set Alterable String of Player 1 to First
Quote:
+ Alterable Value A of Player 1 < Alterable Value A of Player 2
+ Alterable Value A of Player 1 > Alterable Value A of Player 3
+ Alterable Value A of Player 1 > Alterable Value A of Player 4
-Set Alterable String of Player 1 to Second
+ Alterable Value A of Player 1 > Alterable Value A of Player 2
+ Alterable Value A of Player 1 < Alterable Value A of Player 3
+ Alterable Value A of Player 1 > Alterable Value A of Player 4
-Set Alterable String of Player 1 to Second
+ Alterable Value A of Player 1 > Alterable Value A of Player 2
+ Alterable Value A of Player 1 > Alterable Value A of Player 3
+ Alterable Value A of Player 1 < Alterable Value A of Player 4
-Set Alterable String of Player 1 to Second
Quote:
+ Alterable Value A of Player 1 < Alterable Value A of Player 2
+ Alterable Value A of Player 1 < Alterable Value A of Player 3
+ Alterable Value A of Player 1 > Alterable Value A of Player 4
-Set Alterable String of Player 1 to Third
+ Alterable Value A of Player 1 < Alterable Value A of Player 2
+ Alterable Value A of Player 1 > Alterable Value A of Player 3
+ Alterable Value A of Player 1 < Alterable Value A of Player 4
-Set Alterable String of Player 1 to Third
+ Alterable Value A of Player 1 > Alterable Value A of Player 2
+ Alterable Value A of Player 1 < Alterable Value A of Player 3
+ Alterable Value A of Player 1 < Alterable Value A of Player 4
-Set Alterable String of Player 1 to Third
Quote:
+ Alterable Value A of Player 1 < Alterable Value A of Player 2
+ Alterable Value A of Player 1 < Alterable Value A of Player 3
+ Alterable Value A of Player 1 < Alterable Value A of Player 4
-Set Alterable String of Player 1 to Last
or you could put the values into an ini++ file. then sort the parent object on highest item value.
you find the on that is on top, and assign it to first, second,etc
if 2 are the same, assign them the save first,second,etc