Ah Ok. Then I would suggest using a multi-dimensional array. The first level containing all of the enemies, the second level containing information about each enemy. Its very much similar to types except you'll be using numbers instead of words, which in some cases is more efficient as you can use them in loops.
So:
DIM Enemy(3,4)
FOR e = 1 TO 3
Enemy(e,1) = 100
Enemy(e,2) = -50 + RND(100)
Enemy(e,3) = -50 + RND(100)
Enemy(e,4) = -50 + RND(100)
NEXT e
Now you've got 3 enemies, each with 100 health and unique positions (the 1st variable is their health, the next 3 are their x, y and z positions).
There still isnt any need to pass the arrays into the function since they're global, but you essentially have a poor-mans version of types. Instead of something like Enemy(1).Health# you have Enemy(1,1). Like I said before this can be more efficient since the numbers can be manipulated easier in a loop rather than the words used in Types.
So, using a basic function you could do something like position the enemies at their coordinates and display their health over their heads:
FUNCTION Position()
FOR e = 1 TO 3
MAKE OBJECT BOX e, 10+RND(5), 10+RND(5), 10+RND(5)
POSITION OBJECT e, Enemy(e,2), Enemy(e,3), Enemy(3,4)
NEXT e
ENDFUNCTION
FUNCTION ShowHealth()
FOR e = 1 TO 3
CENTER TEXT OBJECT SCREEN X(e), OBJECT SCREEN Y(e)-10, "HP: "+STR$(Enemy(e,1))
NEXT e
ENDFUNCTION
Adding it all up into a basic program:
SYNC ON:SYNC RATE 0:AUTOCAM OFF
DIM Enemy(3,4)
FOR e = 1 TO 3
Enemy(e,1) = 100
Enemy(e,2) = -50 + RND(100)
Enemy(e,3) = -50 + RND(100)
Enemy(e,4) = -50 + RND(100)
NEXT e
POSITION CAMERA 0,200,-300
POINT CAMERA 0,0,0
Position()
DO
ShowHealth()
SYNC
LOOP
FUNCTION Position()
FOR e = 1 TO 3
MAKE OBJECT BOX e, 10+RND(5), 10+RND(5), 10+RND(5)
POSITION OBJECT e, Enemy(e,2), Enemy(e,3), Enemy(3,4)
NEXT e
ENDFUNCTION
FUNCTION ShowHealth()
FOR e = 1 TO 3
CENTER TEXT OBJECT SCREEN X(e), OBJECT SCREEN Y(e)-10, "HP: "+STR$(Enemy(e,1))
NEXT e
ENDFUNCTION
Ofcourse this is a basic example but you see what I mean. You can add more dimensions to the array for more classification. For example, going up once more you could have Players>Enemies>Information, and then another category for Allies (Players>Allies>Information). So if there were 2 Player Types, Enemies and Allies, and there were 5 enemies and 6 allies, and each enemy/ally had 10 pieces of information, you'd do something like this:
DIM Players(1,5,10)
DIM Players(2,6,10)
You could make it easier to understand by storing the default values in variables, like so:
Players = 2
Enemies = 5
Allies = 6
Information = 10
DIM(Players, Enemies, Information)
DIM(Players, Allies, Information)
Though that'd cause for more lines and data storage. The route is up to you, I think thats what you meant though.
Goodluck,
- RUC'