I had a similar problem and solved it.
I wanted a mini-boss in an area to "feed" off of a placeable object's "life" during battle until the placeable ran out of life.
Once the placeable ran out of life, I wanted it to explode and scatter gems around the room, near to where the placeable used to be.
In order to make the gems look realistic, I used the gemstone placeables as containers and created an appropriate gem inside each container.
The important point is that the floor was uneven (the skull-shaped floor) so I needed to find exactly where "floor height" was. The only realistic way to find the correct floor height was to create a NPC in a random location, find out where it was standing then destroy it.
Since the area was a single, self-contained mission, I set up the onenter for the area to check if the boss had been defeated or not, and to set up the area for the entering player if it hadn't already been set up before and the boss left unkilled.
As part of the onenter script, I made a loop which created NPCs randomly around the correct location and then stored the locations of those NPCs in variables on the area before destroying the NPCs.
Since all of the hard work is done during the onenter script, any lag caused is combined with the normal delay on loading a new area and therefore is less noticable.
When I need to create the placeables which contain the loot gems, I just access the variables I stored previously on the area.
Maybe you can do something similar?
Modifié par Melkior_King, 01 juin 2011 - 10:24 .