| 02-17-2004, 01:30 PM | #1 |
How do I make it so that it compares 4 intergers and if XInterger is highest, create unit? |
| 02-17-2004, 01:44 PM | #2 |
lots of if - then- else statements? im sure theres a faster way to do it, but thats simple and off hand. if x > y then, if x > z then, set x = your winner else set z = your winner else if y greater than z then, set y = your winnder else set z = your winner go from there. |
| 02-17-2004, 01:53 PM | #3 |
Math - Max() is probably less writing: Code:
Actions
Set i = (Max((Max(A, B)), (Max(C, D))))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
i Equal to A
Then - Actions
Else - ActionsThe highest value will be stored in "i" then; then do your if-statement. |
| 02-17-2004, 02:00 PM | #4 |
Math. Hurt. Brain. |
