How can I capture world...

Blitz3D Forums/Blitz3D Beginners Area/How can I capture world...

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

You'll need to use either arrays or type objects.

Type Machine_Part
   Field name$
   Field entity
End Type


m.machine_part = new machine_part

m\name$ = "Gage1"
m\entity = createsphere() ; just for example

m\name$ = "Gage2"
m\entity = createsphere() ; just for example

m\name$ = "Part1"
m\entity = createsphere() ; just for example

m\name$ = "Part2"
m\entity = createsphere() ; just for example

Open "C:\Temp\capture.txt" for output as #1

For m.machine_part = Each machine_part

   Print #1,EntityX(m\entity)& "," & EntityY(m\entity) & "," & EntityZ(m\entity)

Next



That will loop through every entity you have created in that type and save them to the text file. Obviously not the correct syntax used, but you get my drift :o)