I use ent_create to create the entities at runtime, keeping their offset in relation to their parent terrain / level piece. I use a while(1) loop for that.