if you are using A8 you can use ent_seed from level.c

Code:
ent_seed (char* name, ENTITY* terrain, BMAP* mask, COLOR* color, var dist, var mode, EVENT act) 
Creates a number of model or sprite entities on terrain, using a seed mask.




3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB