Hi guys, maybe for the summer hot temperature or too many years without programming but I have a problem; I think a little problem but I stuck.
I have a two-dimensional array:
dim objects_hit(100,10)
I have another array too:
dim index(100)
I have 100 character object (obj numbers from 300 to 400)
I have a single object as visual wave too (obj numb 200)
This "objects_hit" array represents
100 characters in the first field and
10 visible objects in the second field.
The "index" array represent the index of visible objects (max 10 objects) for all the 100 character objects.
In my code ONLY THE SECOND character (obj number 1, only him) will shot the visual wave ; when this visual wave will hit another character so
I need to fill "objects_hit" array with the right character number in the right index!.
ok I tried this:
IF flag_check_collision = 0
FOR a = 0 to 99 //represents all the characters
IF OBJECT COLLISION( 200, a+300) = 1
objects_hit( 1 , index(1) ) = a //the character number It's inserted into the array
inc index(1) // I tried to use index(1) = index(1) + 1
if index(1) = 10 then flag_check_collision = 1 //when index is 10 so we exit from the code inside the condition of "IF flag_check_collision = 0" we will avoid out of bounds array error
ENDIF
NEXT a
ENDIF //end of IF flag_check_collision = 0
So I get a lot of kaos inside my "objects_hit" array.. and the index seems to go over the cicle with strange values too..
why????
Thank you all in advance!