my first 20 line challenge entry
ObjectCleanup:
for I = 1 to 10000
if OBJECT EXIST(I) = 1
OX# = Object Position X(I)
OZ# = Object Position Z(I)
OY# = Get Ground Height(1,OX#,OZ#)
ObjectDist=Sqrt((OX# - X#)^2 + (OY#+25 - Y#)^2 + (OZ# - Z#)^2)
if ObjectDist >= 5001
HIDE OBJECT I
else
Show Object I
endif
endif
next I
return
To make it so that it works fun with yours game just change 10000 to how ever many objects are in your game and change the 5001 to the distance you want the object to be hiding (best if it is 1 more the the camera range)
Making better games everday!
Oh yeah and just so you know its Oh-nek-a not One-ka!