Gabriel's answer pretty much says it all.
Could you elaborate on what you are trying to achieve if the answer was not sufficient?
I'll see if I can help though.
type MyType
field x
field y
field z
field hitpoints
field anythingyouwantetcetc
end type
;create a few type instances (10) for example purpose
for i=1 to 10
a.mytype=new mytype
a\x=;any values you want
a\y=;any values you want
a\hitpoints=;any values you want and so forth
next
;cycle through each type instance and 'interact' (as you say above) with each other type , but not itself
for a.mytype=each mytype
for b.mytype=each mytype
if handle(a)<>handle(b) then
;these are different type instances
interact();some function created by yourself to represent whatever 'interaction' you had intended in your first post
else
;this must be the same type instance, so do nothing
endif
next
next
Note however that the code above will cause each type to 'interact' twice, I'll see if you can work out how.
|