Also, using the Object() and Handle() commands, you can obtain an integer pointer to the Type, which can be used as the name of the entity. This way, you don't need to search through the list, but you can directly get the Type object that the entity belongs to.
Out of my head, that would be along the lines of this:
Out of my head, that would be along the lines of this:
sh.ship = New ship sh\sprite = CreateSprite() NameEntity sh\sprite, Handle(sh) .. ShipID=EntityName(PickedEntity()) If ShipID <> 0 then sh.ship = Object.Ship(ShipID) ..use sh.. End If