The method I alluded to above does just that. I used Handle and NameEntity to store the type object's handle as the entity's name like so:
NameEntity critter\entity,Handle(critter)
(btw, I have a type called 'creatures' with a field called 'entity', and instance of that type called 'critter'.)
Then I could use Object later to retrieve the type object:
critter.creatures=Object.creatures(EntityName(picked))
Note that while this method feels more elegant than the loop kurix posted, I haven't bothered to check which executes faster. I would guess that using Object is faster, but I don't really know.
NameEntity critter\entity,Handle(critter)
(btw, I have a type called 'creatures' with a field called 'entity', and instance of that type called 'critter'.)
Then I could use Object later to retrieve the type object:
critter.creatures=Object.creatures(EntityName(picked))
Note that while this method feels more elegant than the loop kurix posted, I haven't bothered to check which executes faster. I would guess that using Object is faster, but I don't really know.