You could use TYPED arrays to achieve a grouping of objects in some form of managable structure.
u could end up with something like this
sync on
sync rate 0
set text size 20
set text font "verdana"
ink rgb(255,255,255),1
TYPE Monster
NUM AS INTEGER
NAME AS STRING
HPS AS INTEGER
x# as FLOAT
y# as FLOAT
z# as FLOAT
ENDTYPE
dim Monster(1) as Monster
Monster(1).NUM=1
Monster(1).NAME="BugBear"
Monster(1).HPS=35
Monster(1).x#=0.0
Monster(1).y#=0.0
Monster(1).z#=0.0
make object cube Monster(1).NUM,10
position object Monster(1).NUM,Monster(1).x#,Monster(1).y#,Monster(1).z#
position camera 0,30,-60
point camera 0,0,0
do
center text object screen x(1),object screen y(1),""+Monster(1).NAME
if escapekey()=1
delete object Monster(1).NUM
undim Monster(1)
end
endif
sync
loop
Im building an RPG so i used that as a reference.
I need Multiples of things and to be able to manage them
easily without having to manage lots of arrays.
its a pain in the butt when u want to flush the game and restart it and you forgot an array or 2.
Using arrays for the above method can work but its a little
more to manage.
this method is great for managing the media numbers also,
Instead of having to remember that Monster 400 is using
3d object location 456, you can reference the number from
Monster(i).NUM
i being the monster u want to alter
This method uses one array and one type.
cleaning up a whole TYPED array group is simplistic.
You just destroy 1 array
I hope that made TYPED arrays clear as mud
http://www.lunarpixel.com/ is my new site