different pointer same type

Blitz3D Forums/Blitz3D Programming/different pointer same type

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.

t.ship=each ship will go through each ship that you have created, regardless of what pointers they are assigned to.

Any time you use something like (pointer) = new ship, its the 'new ship' part that is creating the type object. The type object exists independently of any pointer, even when it is not assigned to a pointer.

One use for multiple pointers is to access the same data from different places (although that's probably not good programming practice). So for example, you might have a mothership object which contains a list of pointers for all the ships inside it, as well as a solar system object that has the same thing. Both would have a pointer to the same ship.