Object() command??

Blitz3D Forums/Blitz3D Programming/Object() command??

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.

Say you have a type called fish

Type Fish
Field colour
Field Speed
End Type

You create a few fish

Fish1.FISH = New Fish
Fish1\color = 1

FirstFish = Handle(Fish1)

Fish1.FISH = New Fish
Fish1\color = 2
SecondFish = Handle(Fish1)

You now have the handles to the two fish. These could be poked into banks, returned from functions etc. Whatever. Then when you want to reference the type again.

FISH1 = Object(FirstFish)

You can then access the type as normal. i.e. Fish1\Color = 2.