haven't tested it, but it should be something similar to this:


var timetocallsprite;

function yourscript()
{
while(1)
{
if (timetocallsprite == 1)
{
ent_create ("yourpic.tga", vector(my.x,my.y,my.z), youraction);
}
wait(1);
}
}