--------------------------------------------------------------------
Type creature
Field name$
Field subent.ent
End Type
Type ent
Field x
Field y
Field z
End Type
cr.creature=New creature
cr\name="creature1"
cr\subent.ent = New ent
cr\subent\x=1
cr\subent\y=2
cr\subent\z=3
cr.creature=New creature
cr\name="creature2"
cr\subent.ent = New ent
cr\subent\x=4
cr\subent\y=5
cr\subent\z=6
For cr.creature=Each creature
Print cr\name
For cr\subent.ent = Each ent
Print cr\subent\x
Print cr\subent\y
Print cr\subent\z
Next
Next
While Not KeyDown( 1 )
Wend
End
--------------------------------------------------------------------
why the "each loop" displays all ENT and not only the ones inside that creature?
thanks
Type creature
Field name$
Field subent.ent
End Type
Type ent
Field x
Field y
Field z
End Type
cr.creature=New creature
cr\name="creature1"
cr\subent.ent = New ent
cr\subent\x=1
cr\subent\y=2
cr\subent\z=3
cr.creature=New creature
cr\name="creature2"
cr\subent.ent = New ent
cr\subent\x=4
cr\subent\y=5
cr\subent\z=6
For cr.creature=Each creature
Print cr\name
For cr\subent.ent = Each ent
Print cr\subent\x
Print cr\subent\y
Print cr\subent\z
Next
Next
While Not KeyDown( 1 )
Wend
End
--------------------------------------------------------------------
why the "each loop" displays all ENT and not only the ones inside that creature?
thanks