Types: After?

BlitzMax Forums/BlitzMax Beginners Area/Types: After?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Add the objects you want to cycle through to a list, and then use For...EachIn to loop through them.

Eg:
Local typeList:TList=New TList

Local objA:MyType=New MyType
Local objB:MyType=New MyType

ListAddLast typeList,objA
ListAddLast typeList,objB

For Local currentObj:MyType = EachIn typeList
     'Do something with currentObj
Next