I created , for example, a boar template, and attached a script (random death) to it. Then I externally added the itemguid of the tracks I wanted to spawn when the boar disappears.
I hope this image can help you, because I don't really understand your question it seems :-(
https://imgur.com/a/Zh04J