Creating more than 1 object for a list...

BlitzMax Forums/BlitzMax Beginners Area/Creating more than 1 object for a list...

Actually, since you are storing the type into a list, you shouldn't need Return at all. This code works:
Type TProps

	Field x:Int,y:Int,size:Int

	Global EntityList:TList=New TList
	
	Function Draw()	
		For Local Prop:TProps = EachIn EntityList
			DrawOval Prop.x, Prop.y, Prop.size, Prop.size
		Next	
	
	End Function 
	
	Method New()
		EntityList.AddLast(Self)
	End Method
	
	Function Create(amount:Int)
	
		For Local i:Int=0 To amount-1			
	
			Local p:TProps=New TProps		
			Local size:Int=Rand(25,35)
			p.size=size			
			p.x=Rand(0,799)
			p.y=Rand(0,599)							
		
		Next
	End Function	

End Type

Graphics 800,600,32
SeedRnd(MilliSecs())

TProps.Create(10)

While Not KeyHit(KEY_ESCAPE)
	TProps.Draw()
	Flip
Wend