Use a for-next loop:
dim object_status(100,4)
rem There are 100 objects, and the array above would store 4 values for each object:
rem 1=X, 2=Y, 3=Z, 4=Health
for a=1 to 100
for b=1 to 4
object_status(a,b)=rnd(100)
next b
next a
rem Every object has it's own "random" value.
rem Now lets see which one has the highest health:
highest_health=0
highest_health_object=0
for a=1 to 100
if object_status(a,4) > highest_health
highest_health = object_status(a,4)
highest_health_object = a
endif
next a
As you can see, it's quite easy.
Quote: "
UPDATED
Amd 2800+ 1024mb pc3200 A7N8X - Deluxe Ati Radeon 9800PRO 256mb"