types within types

Blitz3D Forums/Blitz3D Programming/types within types

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.

YES you can,

here's a good example from Krylar's book "Learn to Program 2D Games in Blitz Basic"...

Quote:

Type Ships
Field Name$
Field LaserPower%
Field Armor%
Field ShieldPower%
Field Missiles%
Field TopSpeed%
End Type

Type Destroyers
Field ShipBasics.Ships
Field LandingBays%
Field FighterCompliment%
Field IonCannonPower%
End Type


Destroyer\ShipBasics.Ships = New Ships
Destroyer\ShipBasics\Name$ = Name$
Destroyer\ShipBasics\LaserPower% = LaserPower%
...
...
Destroyer\LandingBays% = LandingBays%

Hope this helps

IPete2.