I am trying to save time when having lots of charactors in a game and wanted to do a for next loop to check a range of object numbers for existance and then pass the x,y,z positions into an array and also add in there at the same time the x,y,z angle values for the objects too..
this is what I have done so far:-
` Create Arrays to hold Player and charactor Positions (o=objects)
For o=1 to 100
If Object exist(o)=1
x#=Object Position x(o)
y#=Object Position y(o)
z#=Object Position z(o)
Ax#=Object Angle x(o)
Ay#=Object Angle y(o)
Az#=Object Angle z(o)
` I think this is the first problem?
CharNo$="Charactor"+"o"+"Pos-Ang"
` and here is the second?
Dim CharNo$(2,3)
CharNo$(1,1)=x#
CharNo$(1,2)=y#
CharNo$(1,3)=z#
CharNo$(2,1)=Ax#
CharNo$(2,2)=Ay#
CharNo$(2,3)=Az#
Endif
Next o
The Program seems to be ok until I add the values to the array, I am sure it is something reasonably simple at fault (most likely me..) but here are the main points I am having probs with or feel there is a problem that I don't know how to get around.
1) Trying to add the "o" number from the for/next loop into the array name string, which should then pass the correct array name with the adjusted object number as the array name which is passed on as CharNo$
2) The fact I am holding the array name in a string variable and then using it to pass the position and angle variables into for each object is causeing a problem, being that the array is infact a string array and not a real number one..
anyway I am most certainly stuck trying to sort this out, I am sure there must be a way, but any idea's how?
thanks for any help.
1ghz Cel,512 sdram 133,Gf2 MX 400 64,SBL 5.1,Win98
Best Upcoming MMOG - http://WWW.Atriarch.com
Project: Card Game with No Name