Picking a random member of a Type List

BlitzMax Forums/BlitzMax Beginners Area/Picking a random member of a Type List

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.

Ryan: Use my IList code if you'll be having hundreds of objects. It's much faster if you're sorting or getting an object at a specific index.

Using my code you can do pretty much the same thing as with TLists for getting objects at a specific index:
Local f:Foo = Foo(MyList.ValueAtIndex( Rand( 0, MyList.Count( )-1 ) ))