Entities in types.......

Blitz3D Forums/Blitz3D Programming/Entities in 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.

It's pretty simple. Your entities are stored in your program by a memory pointer. This is simply an integer so you can easily put it in a type:
type ship
 field health,shields
 field entity          ;just an integer that stores the entity handle
end type

s.ship=new ship
s\entity=createcube()